cleaning up code, pagination options