Add basic support for pagination