Refactor hard coded urls out of templates