Adding in support for more graphs and a bundle of refactoring