Fix wrong error message.
Kick out constants to other module.
Functionize
Fix SRP violations.
Add utf8 pragma.
Extract some functions that work with PPI Document.
Tiny refactor