Refactor hard-coded URLs out of templates