Unit tests for dao and service classes

Amended service classes to conform to the Singleton pattern. Added more test cases.