Rendering logic.