Working version with cycle-detection, cycle-collapsing, and independent-set-finding (plus abstraction-finding). Also, unit tests.