JS: Fixed a few bugs.
Added a note on touch event generation.