Fix duplicate handler registration error

The duplicate handler was not discarded.
Make applyOptions public
Fix getTextWidth misuse

A string was given even though a Text object was specified in the docs.