let update_visibility = ref (fun () -> ())