Add wrapLinks helper back and add some tests for this. [Fixes #129]