Moved unnecessary stuff out of controllers and into service layer.