This is the master detail sample... you could have removed all the extra comments and cleaned everything up a bit, but its fine.