lots of cleanups, thanks #haskell :)