Broke down server logic into routes. Wrote unit tests.