     (remove-hook 'kill-buffer-hook #'+org-present--cleanup-org-tree-slides-mode
                  'local)))
 
-(defun +org-present--make-invisible (beg end)
-  (unless (assq '+org-present buffer-invisibility-spec)
-    (add-to-invisibility-spec '(+org-present)))
-  (let ((overlay (make-overlay beg (1+ end))))
-    (push overlay +org-present--overlays)
-    (overlay-put overlay 'invisible '+org-present)))
-
 
 ;;
 ;;; Hooks

  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "^[[:space:]]*\\(#\\+\\)\\(\\(?:BEGIN\\|END\\|ATTR\\)[^[:space:]]+\\).*" nil t)
      (+org-present--make-invisible
       (match-beginning 1)
       (match-end 0)))))

;;;###autoload
(defun +org-present-hide-leading-stars-h ()

  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "^\\(\\*+\\)" nil t)
      (org-flag-region (match-beginning 1)
                       (match-end 1)
                       org-tree-slide-mode
                       t))))

;;;###autoload
(defun +org-present-remove-overlays-h ()
