Refactored server/Terminal.js to inherit server/Relay.js