Completed code for including class information in the templates;