JSLint fixes, and preliminary touch support