Some refactoring on the file structure