Refine mode hooks