Clean up code stolen from cabal
Merge pull request #21 from anchor/forM

Clean up code stolen from cabal