Rewriting the swap router algorithm

The swap router algorithm has been re-written to improve swapping of exchange pairs more efficient. Undertaking current unit testing.