minor rearrangement of pipeline phases
got rid of dangerous free on way out of test_allpairs