cleaner html

using a function to generate html links