Added key terms to HTML output

This involved also creating a search and replace mechanism for applying layers.