Some code reworking in render.cpp.