Refactors first pass on render routine.