AJAX pagination and some light house keeping