Refactor the collection view functionality into an abstract view.