Added mode to the templates