Simplify controllers, moving all error-handling code to private methods.