Graph construction working, but slow.