Refactor of code into Local, Remote and Sync classes.
Added tests for local and remote.
No new additional functionality