function Order (fee, tax, tipPercent) {
  var subtotal = 0;
  var costs = {};

  function setDefaults () {
    if (!fee) {
      console.warn('Fee unset; defaulting to 0');
      fee = 0;
    }

    if (!tax) {
      console.warn('Tax unset; defaulting to 0');
      tax = 0;
    }

    if (!tipPercent) {
      console.warn('Tip unset; defaulting to 0');
      tipPercent = 0;
    }
  }

  var order = {
    addItem: function (name, cost) {
      if (costs[name] == null) {
        costs[name] = 0;
      }

      costs[name] += cost;
      subtotal += cost;
    },

    set fee (x) {
      fee = x;
    },

    set tax (x) {
      tax = x;
    },

    set tipPercent (x) {
      tipPercent = x / 100;
    },

    split: function () {
      setDefaults();

      taxPercent = tax / subtotal;
      feesPerPerson = fee / Object.keys(costs).length;
      tip = tipPercent * subtotal;
      total = subtotal + tax + fee + tip;

      totals = {};
      for (var person in costs) {
        totals[person] =
            costs[person] + // cost of items
            costs[person] * taxPercent + // tax on items
            costs[person] * tipPercent + // tip on items
            feesPerPerson;
      }
    },

    get costs () {
      return costs;
    },

    get fee () {
      return fee;
    },

    get feesPerPerson () {
      return feesPerPerson;
    },

    get tax () {
      return tax;
    },

    get taxPercent () {
      return taxPercent * 100;
    },

    get tip () {
      return tip;
    },

    get tipPercent () {
      return tipPercent * 100;
    },

    get total () {
      return total;
    },

    get subtotal () {
      return subtotal;
    },

    get totals () {
      return totals;
    }
  };

  order.fee = fee;
  order.tax = tax;
  order.tipPercent = tipPercent;

  return order;
}

@@ -22,23 +22,33 @@
 tax, tip
+, isTip
 Percent
+age
 ) %7B%0A  va
@@ -298,23 +298,16 @@
 if (!tip
-Percent
 ) %7B%0A    
@@ -657,23 +657,69 @@
  set tip
+ (x) %7B%0A      tip = x;%0A    %7D,%0A%0A    set isTip
 Percent
+age
  (x) %7B%0A 
@@ -719,25 +719,27 @@
 (x) %7B%0A      
-t
+isT
 ipPercent = 
@@ -739,18 +739,15 @@
 cent
+age
  = x
- / 100
 ;%0A  
@@ -799,16 +799,175 @@
 lts();%0A%0A
+      if (isTipPercentage) %7B%0A        tipPercent = tip / 100;%0A        tip = tipPercent * subtotal;%0A      %7D else %7B%0A        tipPercent = tip / subtotal;%0A      %7D%0A%0A
       ta
@@ -1052,43 +1052,8 @@
 th;%0A
-      tip = tipPercent * subtotal;%0A
     
@@ -1728,32 +1728,99 @@
  * 100;%0A    %7D,%0A%0A
+    get isTipPercentage () %7B%0A      return isTipPercentage;%0A    %7D,%0A%0A
     get total ()
@@ -2005,27 +2005,53 @@
 rder.tip
-Percent = t
+ = tip;%0A  order.isTipPercentage = isT
 ipPercen
@@ -2051,16 +2051,19 @@
 pPercent
+age
 ;%0A%0A  ret

Change Order to take tip as non-percentage with a flag to calculate one based of the other