Added support for categories in the flat view control to fix #153