improved keyword support and trimmed whitespace from headings