Added some ghc flags.
Made the main run a test.