Initial client refactor.