angular.module('app').factory('GameRepository', function(session, $q, $firebase) {

  var ref = new Firebase("https://languagehuntgamehub.firebaseio.com/");
  var sync = $firebase(ref);

  var retrieveChild = function(child) {
    var deferred = $q.defer();
    var languageRef = ref.child(child);
    languageRef.once('value', function(data) {
      deferred.resolve(data.val());
    });
    return deferred.promise;
  };

  return {

    getLanguages: function() {
      return retrieveChild('languages');
    },

    getLanguage: function(language) {
      return retrieveChild(language);
    },

    saveLap: function(language) {},

    saveSquare: function(squareId, square) {
      var objectToSave = {
        "type": square.type,
        "props": square.props,
      };
      objectToSave.interactions = _.map(square.interactions, function(item) {
        return {
          "question": {
            "text": item.question.text,
            "audiofile": item.question.audiofile },
          "answer": {
            "text": item.answer.text,
            "audiofile": item.answer.audiofile }
        };
      });

      squareRef = ref.child(squareId);
      squareRef.set(objectToSave);
    },

    createGuid: function() {
      var s4 = function() {
        return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
      };
      return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
    }

  };

});

@@ -679,446 +679,8 @@
 ) %7B%0A
-      var objectToSave = %7B%0A        %22type%22: square.type,%0A        %22props%22: square.props,%0A      %7D;%0A      objectToSave.interactions = _.map(square.interactions, function(item) %7B%0A        return %7B%0A          %22question%22: %7B%0A            %22text%22: item.question.text,%0A            %22audiofile%22: item.question.audiofile %7D,%0A          %22answer%22: %7B%0A            %22text%22: item.answer.text,%0A            %22audiofile%22: item.answer.audiofile %7D%0A        %7D;%0A      %7D);%0A%0A
     
@@ -738,20 +738,28 @@
 set(
-objectToSave
+angular.copy(square)
 );%0A 

Remove unneeded code