several design improvements to popup window ref #5