Improved Remove Unnecesary Folders Function