Moved idle event handling to the server.

16 files changed