Smooth out the API to make things easier to use

Fixes #24.