Cleaning up remote repo logic.  Cleaning up code.