Document API

Closes #4