function objToPaths(obj) {
        var ret = {},
            separator = DeepModel.keyPathSeparator;

        for (var key in obj) {
            var val = obj[key];

            if (val && val.constructor === Object && !_.isEmpty(val)) {
                //Recursion for embedded objects
                var obj2 = objToPaths(val);

                for (var key2 in obj2) {
                    var val2 = obj2[key2];

                    ret[key + separator + key2] = val2;
                }
            } else {
                ret[key] = val;
            }
        }

        return ret;
    }
Takes a nested object and returns a shallow object keyed with the path names
e.g. { "level1.level2": "value" }

@param  {Object}      Nested object e.g. { level1: { level2: 'value' } }
@return {Object}      Shallow object with path names e.g. { 'level1.level2': 'value' }