Added a keylistener and patched up some stuff that was bothering the
CPU.