updated data reading functions so they all operated under the assumption that matlab order is reverse of true order and trailing singleton dimensions are removed.