fix license header.
Improve haddock documentation.