var cdb = require('cartodb.js');

/**
 * Represents a User's map URL.
 * TODO: The new maps are not yet implemented so right now these paths point to the current /viz/ paths.
 */
module.exports = cdb.core.Model.extend({

  initialize: function(args) {
    this.userUrl = args.userUrl;
    this.vis = args.vis;
  },

  toEdit: function() {
    return this._toStr('map');
  },

  toPublic: function() {
    return this._toStr('public_map');
  },

  _toStr: function() {
    return this.userUrl.toStr.call(this.userUrl, 'viz', this.vis.get('id'), Array.prototype.slice.call(arguments, 0));
  }
});

@@ -218,103 +218,8 @@
 (%7B%0A%0A
-  initialize: function(args) %7B%0A    this.userUrl = args.userUrl;%0A    this.vis = args.vis;%0A  %7D,%0A%0A
   to
@@ -229,32 +229,32 @@
 t: function() %7B%0A
+
     return this.
@@ -370,28 +370,62 @@
 ) %7B%0A    
+var userUrl = this.get('userUrl');%0A    
 return 
-this.
 userUrl.
@@ -435,21 +435,16 @@
 tr.call(
-this.
 userUrl,
@@ -460,11 +460,18 @@
 his.
+get('
 vis
+')
 .get

Simplify map url model