Refactoring of Element attributes call