Hmm, I think this would be a lot faster if you moved the items around with some loops, rather than copying big slices of data.