Cleaner graph approach

Accidentally committed this to the iss1 branch.  Oops.