A lot of code optimization with regard to deleting and creating folders.