Some tidying up after turning on warnings.
Start explaining the Haskell code.