Added test cases
Refactoring to move the server