Improved docset generation.

Now types and categories are set as well.