Refactored team & client on server side.