Passwordless rsync and cleaning up code