Added key events and some other things