Refactored server modules to make better use of native modules