added unit tests for input controllers, and fixed associated bugs. Tested browserify with phaser, seems to work.