ES role refactoring