added code for removing the old detail and master view from their superviews when using the setDetailViewController and setMasterViewController (same way as done in setViewControllers)