No idea why I didn't just write these like this the first time. I was not tired or anything, so...
Refactor some keyboard methods and various helpers.
More most three initialization code to three-init.js.
Refactor keyboard events.