Refactor cs sand html