Fixes #24
Refactor and simplify attaching consent documents.