Capturing initial pseudo-code for stored proc 'buildTre
Updated pseudo-code (and helper functions) for tree-definition logic