Breaking out the graph construction and simplifying the object state, along with starting to break out the helper functions