removed teh duplicate files and cleaned the code