Refactor debug scripts.
Hydrator: start to implement resource link hydration.