Refactoring to allow for multiple instances
yep, refactored :)
And graphs are working!