Implement edit function for categories, fixes IM-3