split io into reader and writer, and minor function rename related
changes.
minor interface changes in continuation from the last commit.
update graph usage to latest interface
moved to more appropriate name
added digraph implementation plus a few other minor changes.