Refactored some enum values.
Fixed DialogAddRule logic.