Refactor decree helpers, refactor decree PDF document view