Added event system, and key events.