move diff html creation in to its own thing