Refactored browse downloads using Perl