Refactoring of data service