Moar client unit test, and some code cleaning.
Removed obsolete files.