Fixed keymappings + refactor