Added template code.