moved countRows() to preprocessing.R; simplified sorting data using sortCohorts()
added determineMainCategory() to group subcategories into main categories