Implemented generic sync of the entities to the client. See #26