Added code to the templates