Refactored code and tests for new server base.