Finish refactored decorator.
Add external text and XML decoration tests.