Automatically generate categories

Please review.
exists