function QueryString() {
  this.raw = window.location.search;

  this.present = function() {
    return (this.raw.length > 0);
  };

  this.includes = function(name) {
    re = '[?&]' + name;

    return (this.raw.search(re) != -1);
  };

  this.get = function(name) {
    if (!this.includes(name)) { return null; }

    var re = '[?&]' + name + '=([^&]*)';

    return this.raw.match(re)[1];
  };

  this.set = function(name, value) {
    /* Remove previously set parameter(s).
       TODO: Is this the best way? */
    var re = '[?&]' + name + '=([^&]*)';
    re = new RegExp(re, 'ig');

    this.raw = this.raw.replace(re, '');
    this.raw = this.raw.replace(/^&/, '?');

    var keyValuePair = name + '=' + value;
    var queryString = this.present() ? (this.raw + '&') : '?';

    this.raw = queryString + keyValuePair;
  };

  this.reload = function() {
    window.location.search = this.raw;
  };
}
@@ -55,23 +55,40 @@
 search;%0A
-%0A  this
+%7D%0A%0AQueryString.prototype
 .present
@@ -99,26 +99,24 @@
 unction() %7B%0A
-  
   return (th
@@ -135,28 +135,41 @@
 h %3E 0);%0A
-  
 %7D;%0A%0A
-  this
+QueryString.prototype
 .include
@@ -189,18 +189,16 @@
 name) %7B%0A
-  
   re = '
@@ -210,26 +210,24 @@
  + name;%0A%0A  
- 
- 
 return (this
@@ -250,28 +250,41 @@
 != -1);%0A
-  
 %7D;%0A%0A
-  this
+QueryString.prototype
 .get = f
@@ -299,18 +299,16 @@
 name) %7B%0A
-  
   if (!t
@@ -345,18 +345,16 @@
 ull; %7D%0A%0A
-  
   var re
@@ -385,18 +385,16 @@
 &%5D*)';%0A%0A
-  
   return
@@ -417,28 +417,41 @@
 re)%5B1%5D;%0A
-  
 %7D;%0A%0A
-  this
+QueryString.prototype
 .set = f
@@ -473,18 +473,16 @@
 alue) %7B%0A
-  
   /* Rem
@@ -519,18 +519,16 @@
 ).%0A     
- 
- 
 TODO: Is
@@ -550,18 +550,16 @@
 way? */%0A
-  
   var re
@@ -589,18 +589,16 @@
 %5E&%5D*)';%0A
-  
   re = n
@@ -619,18 +619,16 @@
 'ig');%0A%0A
-  
   this.r
@@ -658,18 +658,16 @@
 e, '');%0A
-  
   this.r
@@ -703,18 +703,16 @@
 ?');%0A%0A  
- 
- 
 var keyV
@@ -742,18 +742,16 @@
  value;%0A
-  
   var qu
@@ -804,18 +804,16 @@
 : '?';%0A%0A
-  
   this.r
@@ -849,20 +849,33 @@
 ir;%0A
-  
 %7D;%0A%0A
-  this
+QueryString.prototype
 .rel
@@ -893,18 +893,16 @@
 ion() %7B%0A
-  
   window
@@ -934,10 +934,7 @@
 aw;%0A
-  
 %7D;%0A
-%7D

Move methods to prototype.