Support pagination

Closes #36