Added the duplicate functionality for categories.