Big code clean-up, added weight to graph-methods