Alter model.js to load data from server with XHR