Remove direct dependency on popup.el