Incorporate test into cabalfile, some clean up according to ghc warnings.