Cleaning and adding file headers