Fixed #1
Connection now raise an event when wrong message is given from the client.

Little improvements and refactoring.