Change categories when editing a rule

#165 
I have a look but it seems to be resonable.