Simplify and make more idempotent.
Fix "this" undefined error.
Simple pagination working.