Refactor internal strucutre of drg. Step 2. (drg-base -> drg-core)