Added further tests and refactored server.rb