Update controller, add some comments