Cleanup hyperlink code and APIify

More work could be done to simplify the `detector` strategy pattern, but that's now confined to the internal classes, so can be simplified any time.
Shouldn't the `Math.max` be done in the `map` method? A negative length is usually wrong.