Changed internal reading function from 4D array to 1D array (easier to expand to higher dimensions than 4). Eliminated deprecated reading function. Tested and works as before.