dup options and add support for defaults on elements and more tests