QA pdf refactor