50% of the way through refactoring controller code to be reusable