Moving validation and model logic out of controllers.