Added extend (like $.extend in JQuery)