Multiple changes and fixes for the client

Implemented multiple fixes for the client/server architecture.