added xSwap, tests, x_ methods. Closes #50.