Added more necessary code to the template files.