Removed unnecessary const_casts from category_type