clean up the controller