More tests, more refactoring, update README to better describe what it
is done and how to call.