Updated server selection code, migrated xmlmenuitem