Some code changes.

- Added HasClient method to Server.
- Simplified some parts.
- EventHandler passes pointer to Server to make sure every
  event really refers to the same server.