2 bugs fixed:

1. Only persists data to localstorage after onload.
2. Fix bug that would not store anything into localstorage if jsonp response was too big