Fixed offset and added max_items logic. Functional but the limit/offset paging is untested.