Fixes #294 Refactored Type::updateDocument() method now it takes Document instance