added test for employees controller and refactored code in controllers