refactor hard-coded urls out of templates