Update doc blocks.
Add complex optgroup type.

This adds support for a more complex type of optgroup elements.