order imports
simplify loadTemplates, only need to return err, since it gets checked at the place that calls it
clarify comment