Better API

Closes #1.
I'll fix it post-merge.