Support pagination

Closes #8