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              |
Not sure it will passes CS. I think 4 spaces are needed.