Added more template code