more code improvements (I think)
moved last remaining graph functions to topological_mapper