This can serve the purposes for both client and server-side synchonization. Also add basic unit tests.