refactoring, secondary indicator fix, style changes, structure update