Made moving the x-array more efficient.