refactor to make pagination more possible.
Merge pull request #1 from bcoe/pagination-refactor

refactor to make pagination more possible.