Struct is initialised with a copy of passed attributes object

* So that setting struct attributes does not modify original objects unexpectedly.