Rich rules support (not complete)

missing is log, audit and action and more testing