[graphte] major cleanup, my python is _rusty_