Collapsed category and subcategory

As proposed in issues #20 and #21 categories and subcategories are now collapsed into just categories. Categories have gotten an optional parent, to allow for sub-categorizing.