refactored to move responses to the server.js module, fixed all tests to pass
changed to run all tests in tests/ directory