Pageavi optimizations.
Merge pull request #32 from devinsays/pagenavi-optimizations

Pageavi optimizations.