Fixed the mangling original parents issue, started modifying swapping of
elements.