Added option to hide empty categories (#645)