Avatar dialog refactoring (part 2)