Changed some getJSON calls to raw Ajax calls to put in timeouts
Made local file retrieval reliant on the test mode being set.
Used reference to current event datasource to prevent old scoped datasource causing problems.