Implement option grouping