Refactor removeMember to allow for other functions :D