Change extendObj and cloneObj methods