Change categories when editing a rule

#165 
Done.