Refactor ChunkMapReader to clean code