factoring some logic out of MMapReader. #18