More tests and support for rules.