Refactored server functionality in preparation for release