Added simple event system. Testing it with quit-command.