Optimized and cleaner access to identifier and attributes

| Q                   | A
| ------------------- | ---
| Bug fix?            | Perf fix
| New feature?        | No
| BC breaks?          | No
| Tests pass?         | Yes
| Scenarios pass?     | Yes
| Checkstyle issues?  | No
| Changelog updated?  | No
| Fixed tickets       | N.A.
| Doc PR              |
Can be better to have constants in an interface for AttributeType. What are you thinking?