Refactor keymap

Created Action/ActionFunc to wrap common operations
refs #121
Document and rename stuff
Merge pull request #127 from peco/refactor-keymap

Refactor keymap