Refactor xsweep to use subarrays
Turns out that subarrays are slower. Change back; update tests.