Create rules and custom actions