expand documentation and use Haskell type signatures