Added getCategories method.