moved inline js to app.js, added wakelock