Added basic pagination support