Added haddock documentation