Cabal fixes

A number of small cabal-related fixes and cleanups.