Serious refactor on the files.