rename_categories() refactor, test, and bug fixes.  Delete deprecated code.
Refactor counts to use objects