Rework getting edges for predecessors

The new design allows for a much cleaner implementation. This now also
works for undirected edges just as well.

Fixes #66