More cleanup and fixed the templates that were calling for non-existent variables