Extended popup menu class to include new popup type to determine which menu item is called
Minor renamings/reformattings/repositionings