Adding optgroup support