Fixed pagination when eager loading objects
Refactored to extract pagination formatting of the result into extra method