graphalign truncation fix + new tests

Not ready for review or merge
A* is commented out for now; will fix later (still pretty fast though)