vm/Document : more work-in-progress porting