cleanup html generation