Modify the click handler for the pagination icons

Update the click handler to use moveTo instead of having a unique copy
of the code to move pages. Fix callback usage in moveTo.