Refactor rsync

Update rsync to working code
Add methods to use web sockets to communicate with client to perform a sync
All these `return`s you have everywhere are odd.  We should probably do another sweep later to fix them.  You shouldn't need to do this all the time.  It means your functions are too big, and too deep.