Set min_rows to 1
Use next_position_in_range instead of next_position
Use page_rows instead as max_rows
Add defaults for page_rows, page_cols
Update demo app