Foreign content parsing almost accomplished. Numeours refactorings