cleaned up the popover directive