Some minor fixes and changes to the rule operator code