Refactoring of data ID handling.