Shorter, Cleaner JS in apps.js