added helper method getFirstTag
Better 'group posts' algorithm
Minor improvements