Upload updates

Build on the upgrade_to branch, which is still unmerged as well.
Regexes we're going to use multiple time should be compiled at the module level.