cleanup pagination and return values (closes #3)