Cleaned Keyboard code