Refactor rendering.