Drying up code and updating to work with categories as objects.