updated templates and replace hardcoded links with url functions