Add support for versioned documents