Improved internal page link code