Add documentation on doctest output and slight refactor.
Parses success cases.
Reorganise the code slightly.
Rename xunit to doctest