Startup changes

fixed bugs and refactored server interface startup code, simplify