Add key binding support
Remove some useless code