Add parent attribute and accessor to elements + shared spec

* also some formatting