Refactor content selection to CoffeeScript concern.