Abstracting classes from controller.