Documented public APIs. Fixes #3.