Break code up into separate subs for parent and child procs.