Update server.rb

Code improvements.