Tidy up some code in category_generator.rb

I was looking at `category_generator.rb` and just noticed a few little things that I wanted to fix