Moved main note sync logic into service

* have a separate clientService responsible to handle REST API calls