Improvements to Haddock reader

Tests are next.