Refactoring text_documents into scrapped_pages