Get rid of 3D arrays.