Initial attempt at implementing pagination.

Currently doesn't work well with the WGL4 checkbox.