Hash out most of the rendering logic