function extend(a, b) {
        for (var p in b) {
            if (b.hasOwnProperty(p)) {
                a[p] = b[p];
            }
        }
        //return a;
    }
Copy properties of `b` to `a`.
@private
@param {Object} a Object that will receive new properties.
@param {Object} b Object whose properties will be copied.