refactored redundant collection code into app.js, updated templates to include spinner markup