Fix and refactor pdf forms.