Updated Controller class.