made urwid code more general
added support for editing gateway meta