* reorg functions and keymap