Refactor rename/remove group api