Update pagination links
Clean up controller