Fixing inheritance of sub tags

Adding tests. Allowing user to create empty array of sub tags through
child element without attribute.
Fix bug in inheritance mechanism