Update data provider to wrap AJAX-call inside Deferred constructor.

Also add reject-workflow if remote call errors.
Update main function instance to handle rejected promise.