Moved swaps to end of circuits