Fix some seriously stupid mistakes, and start adding support for the keyboard