Separate server implementation into server.rb