Added object copy to allow passing array of params to gate factory. Now we can create factories for expanding gates.