Fix documentation.
Add some common convenience functions.