added some more keys to the keymapping and cleaned up the code