Cleaning files and adding javascript