fleshing out keyboard support; adding in unit tests for keyboard support; minor bug fixes and refactorings