added disconnection and popmenus and main menu bar functions