Refactor qos-stat