cleaned up updatePage() in collection.js and farmed out functions to utilities.js