documentation changes and changed hpi_ref to template for variable name