Fixed some url issues and some syntax errors in the template files.