Removed unnecessary code from the Viewcontrollers