Factor out functionality into a model so the controllers get more lightweight