Code cleanup, inheritance in config and mention parsing in matching patterns