refactor client class out of player