datagraph refactoring