refactor graph writer into more functions
make nodes tuples
support attribute tagging on edges and nodes