Moves client management code
Moves it to excom/server/client in order to clean up
the server code.  Also cleans up memory allocation.