Bugs fixed and categories are now ordered.
Closes #10