Minor refactoring of document related interactions