Got basic pagination working.
Cleanup code after getting pagination working

(but without filtering yet).