Address most review comments.
Add a unit test for the code merging the local contacts with the online contacts received from the server.