Refactoring to have a single document creation step for all docs  [KFSQA-1065]