Modified Extend

DOM works fine now with extend's deep copy array to objects fix.