Further rendering code cleanup.