Adding template code