Adjust server methods for input detection and exit