Rule cleanup