Renderer clean ups

More renderer clean-ups, mainly to use explicit `for` loops rather than closures.