Refactored the server tests
Handshaking between client and server ; also refactored the server wiring code to get rid of the singletons