Built the basic template system