Fully working PHI downloader and sanitizer