Refactoring, reducing msg HTML

I had multiple areas where I declared essentially the same message
structure HTML, which obviously violated DRY, so I have created a
function that declares the HTML in one place and can be plugged with
variables for the different messaging scenarios. At this point the old
code is commented out, but will be removed.