Added haddock documentation.