Move post-rank edge reorientation to the rank function