fixes #24 refactoring, fixed fault, added keybinding