Refactor.
Converted some Java to Scala.
More support in case ghc-modi can not help.