More work on multidocument support