Moving more functions out of the apply controller