Updated controller class.