Fixed a couple residual issues in onMouseClick (thanks _123DMWM).

Also continued cleanup on the input system. Moved all input-handling code out of tick() into handleInput() method.