refactor haskell stuff; cleanups; set license