Some tidying, and removed unworthy "TODO" comments

Began work moving to proper use of switch/case
for keyboard event handling, rather than
sequentially chained 'if' statements.

Added new TODO entry: fix keyboard event handling.