Only go to the server when needed

Only go to the server when we know there are more points to load
Improved error handling for the AJAX call