Refactored server constants and methods into single class.