refactored graph intiializer to allow for better ordering of changes