refactor the ajax out of app logic, mimic d3.json pattern