Small refactoring for summariz library