Refactoring avatar with service