Refactor renderer.