revised KeywordFilter for structure
fixed: multiple pinned keyword filters are not colored correctly
revised and added test case for toggle switch