Removed debug code and made links go to pages