Refactor rsync

Update rsync to working code
Add methods to use web sockets to communicate with client to perform a sync
And just noticed a few places that don't have that since they are from the anchor code. Added them in now