More refactoring of visual rendering.