massive overhawl of the edf reading functions