Added Group by 'Class' and 'Trait' options.

Added Group by 'Class' and 'Trait' options.