Refactoring of ClientGroup plugin