Fixed issues wrt the unit tests and made sure that they are 
passing.