some new rules and a few fixes
a tool to check that the rules are ok