Support for displaying in a Popover view and a mem leak fix.