Added popup dialogs, default popup xml, added features to <mode> tag, and lots more.