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              |