dataProvider: code cleanup. Proper calls for onError() function. Few code optimizations.