Removed master detail code