Updated pagination to use localStorage for offline use.