Added optgroup support