Refine flashes and restrict page count