more graph stuff, minor fixes