Refactor: client