started moving a lot of logic from controller to the model where that shiz belongs