Adding category on NSManagedObject. Removing empty categories.