Refactored 'removeMembers' action handler, fixing the reported bugs.