Add function to remove unnecessary modes from flymake