Sliced and dice the layout

Pulled out a bunch of common stuff to little HTML fragments for easier
composition