Refactor sand rendering.