Work on auto-sizing for popups