Refinements to the rules engine API