Refactor prettifier to interpreter.
Refactor logic for resolving external scripts.