Lesser changes:

- Manage refs correctly
- Render optional elements with dotted border