Cleaning up javascript with mobileApp.js
Adding comments for group member readability