Change categories when editing a rule

#165 
This will need to be updated after changing the function in the operator above.