Reworked haskell some