Refactored server to integrate signalmaster.