refactored code, simplified keyboard handling, js-lint-ed
Merge pull request #1 from rschrieken/master

refactored code, simplified keyboard handling, js-lint-ed