Files mapped but not read and some refactor