Added some template code