Adding documentation, cleaning up code, adding a few more tests, and extending
the README file.