Code clean-up. * jk/remote-insteadof-cleanup: remote: check config validity before creating rewrite struct