Start to refactor rendering.