added a template_tools function, updated some algorithm projects.