added search page generation and switched to using Templates for string substitutions to avoid jinja {} errors.