Added tests and cleaned up code, introduced private methods in ContactManagerImpl &  added exceptions