Updaed add edit controller.