add bunch of helper fxns
add tokens for upstream/downstream immediate
reaffirm adding edges to the enclosing container
add flatten method
fix indentation on set_union
no level of indirection with direction nonterminal -- just use upstream/downstream
add filter dup ids method
add find_immediate method and helpers