Merge pull request #29 from cpancake/master

Support class directives in dictionary table export.
Shorten and improve table export code a bit
Remove tail recursive call in table export code
Replace ForEach() calls with foreach loops
Properly format document so Rohan doesn't kill me
Fixed some really stupid bugs.

Things I forgot to do the first time around:
    Check if there were actually any classes before adding them to the
    "classes" list.
    Check if there were any items in the classes list before processing
    it.
    Add items without any classes to the tree.

Thankfully, it's all fixed.