haskell mode and java mode improved