Changes to Realignment, including adding more tests