EDOC-841 unfiled + refactoring