Restructured server code to make it more modular
Blank prompt now not accepted when taking control