Move model hook into the controller