Added commenting and implemented the clean upload files directory