Use Document::getOptions in Type::addDocument. Fixed wrong underscore removal in getOptions