Now has comments and conforms to Haskell style regulations