Pagination work (WIP).

Working on pagination. Commit before switching to "eduard" branch.