Switches from JSONP to CORS

Updates the Ajax to use CORS instead of JSONP.

Fixes a bug in calculating the Ajax update frequency.