Moved the apps JS into an object literal sturcture.