Added tests, and debugged the simplest possible rule.