Some basic cleanup of the advanced example