Pagination

Quick and dirty hack version.

Needs tests and must be refactored along with the
coming persistence changes.
Are these leftover debugging/development puts statements?