Clean up DOM renderer code for untested minor performance advantages

Minor clean-ups.