Setting up model and controller.