Refactor to use base types from base document