Updated ideology grouping algorithm.