Revert "Dirty Hack: Change in_edges and out_edges places"

This reverts commit 6f7221cdd0ac59eb58dc7d511be9e1231126357a.