Lots of graph fixes and formatting