This commit adds documentation comments to the public API. In order for `cargo doc` to build the documentation site, though, the crate must be a library, so the `lib.rs` is needed to expose the necessary bits.