Graph construction class