Update docgen with a few bug fixes and creating a viewer.