Add api, upgrade to require.js, modernize graph generation and pull data from api