Remove magic from controller class