Refactor stuff out of lib/servers/base.rb