Improved the way links are generated.