light query cleanup