Splited the file for category info generation.

And fixed a minor bug.