Add categories support.

Now user can specify categories at head of the file.