Trim the output and sample before returning.

Because the user could be looking at a diff of these, it's important
that the trimmed results are what get returned.
Remove unnecessary namespacing.
Improve documentation, especially the README.