Haskell improvements. Scratch buffer tweak.