add NewDocumentFromText and small changes

NewDocument constructor must either be universal, otherwise it sludeut replaced by a more suitable name (NewDocument -> NewDocumentFromUrl)