more refactoring for flycheck and key-bindings