factoring out MasterViewController