refactoring routes and server specs