Added better type detection, tests, not reading type sets as seq
anchor trigger regex to avoid false positives