Refactoring doc info logic