Paginating in both front end and back end. the performance should be better.
Bug fix for paginating.
Merge pull request #44 from madimalo/master

improve the paginating, the performance is better.