Finished basic version. Splits into correct pairs, but of incorrect order.