review source code from forouher/feature/documentprovider

These flags should be removed when rebasing/merging.