Separated app logic into app.js. Added touch event handlers for FFOS