General revision of the library, the examples, and the readme.