use flycheck globally instead of flymake and delete some unnecessary code