Cleaned up loading of data arrays.