Fix haddock parse error.
Add missing documentation and fix spelling errors.