Validated doctests and improved output