Properly handle client messages
Removed unecessary stuff