Refactor hardcoded URLs out of templates