Finished the template code