XXX: big refactors
XXX: curses