remove server locks and cleanup processCommand