diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index d83a0339160088433b1a8a93f9e8fd8abf78a5f1..07a42475fc4a4bd973185319a6d9c25b041a9aff 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -9,6 +9,7 @@
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+    <uses-permission android:name="android.permission.INTERNET"/>
 
     <application
         android:allowBackup="true"
@@ -20,6 +21,9 @@
         <meta-data
             android:name="com.google.android.awareness.API_KEY"
             android:value="AIzaSyDqliqBcEQQAvMZR-RengdLUJaAYeRKbgs"/>
+        <meta-data
+            android:name="com.google.android.gms.version"
+            android:value="@integer/google_play_services_version" />
         <activity android:name="com.notificationFramework.sedentary.frontEnd.MainActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/src/main/java/com/notificationFramework/sedentary/frontEnd/SaveFile.java b/src/main/java/com/notificationFramework/sedentary/frontEnd/SaveFile.java
index 35cc69e1dd5a840973cef2e56f339ff63b59e7af..b21cb87d525113cb717f0a16197be00e81888460 100644
--- a/src/main/java/com/notificationFramework/sedentary/frontEnd/SaveFile.java
+++ b/src/main/java/com/notificationFramework/sedentary/frontEnd/SaveFile.java
@@ -8,6 +8,7 @@ import android.support.annotation.NonNull;
 import android.util.Log;
 
 import com.google.android.gms.awareness.Awareness;
+import com.google.android.gms.awareness.AwarenessStatusCodes;
 import com.google.android.gms.awareness.snapshot.LocationResponse;
 import com.google.android.gms.awareness.snapshot.PlacesResponse;
 import com.google.android.gms.awareness.snapshot.WeatherResponse;
@@ -15,6 +16,7 @@ import com.google.android.gms.awareness.state.Weather;
 import com.google.android.gms.common.api.GoogleApiClient;
 import com.google.android.gms.location.places.PlaceLikelihood;
 import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.RuntimeExecutionException;
 import com.google.android.gms.tasks.Task;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
@@ -302,11 +304,12 @@ public class SaveFile {
         String places = "";
         String line;
         ArrayList<String> contents = new ArrayList<String>();
-        for (PlaceLikelihood p : placeLikelihoods) {
-            places = places + " " + String.valueOf(p.getPlace().getName()) + " "
-                    + String.valueOf(p.getLikelihood() + "\n");
+        if(placeLikelihoods != null) {
+            for (PlaceLikelihood p : placeLikelihoods) {
+                places = places + " " + String.valueOf(p.getPlace().getName()) + " "
+                        + String.valueOf(p.getLikelihood() + "\n");
+            }
         }
-
         String writeLine = String.valueOf(latitude) + " " + String.valueOf(longitude) + " " + places
                 + String.valueOf(temperature);
         if (isExternalStorageMounted()) {
@@ -361,8 +364,12 @@ public class SaveFile {
                     SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.preference_file_key),
                             Context.MODE_PRIVATE);
                     SharedPreferences.Editor editor = preferences.edit();
-                    editor.putLong(context.getString(R.string.store_lat),Double.doubleToLongBits(task.getResult().getLocation().getLatitude()));
-                    editor.putLong(context.getString(R.string.store_long),Double.doubleToLongBits(task.getResult().getLocation().getLongitude()));
+                    try {
+                        editor.putLong(context.getString(R.string.store_lat), Double.doubleToLongBits(task.getResult().getLocation().getLatitude()));
+                        editor.putLong(context.getString(R.string.store_long), Double.doubleToLongBits(task.getResult().getLocation().getLongitude()));
+                    }catch(RuntimeExecutionException e){
+                        Log.d("ERROR", e.getMessage());
+                    }
                     editor.commit();
                 }
 
diff --git a/src/main/java/com/notificationFramework/stimulus/SedentaryStimulus.java b/src/main/java/com/notificationFramework/stimulus/SedentaryStimulus.java
index ba174c51c7fd7058487ed6052e0612a0e6eae366..d3cad58986d610c0dae2624f6e791fe1c52fd0f7 100644
--- a/src/main/java/com/notificationFramework/stimulus/SedentaryStimulus.java
+++ b/src/main/java/com/notificationFramework/stimulus/SedentaryStimulus.java
@@ -159,9 +159,12 @@ public class SedentaryStimulus extends BroadcastReceiver implements Stimulus {
     //Returns true if notification is to be sent
     private boolean checkAcknowledged(SharedPreferences shared, Context context){
         int period = shared.getInt(context.getString(R.string.daily_goal), context.getResources().getInteger(R.integer.daily_goal_minutes));
-        float ackThreshold = (24/period) * threshold;
-        float avgAck = shared.getFloat(context.getString(R.string.avg_ack), 4);
-        if(avgAck < ackThreshold){
+        float ackThreshold = (24/period);
+        ackThreshold = ackThreshold * threshold;
+        Log.d("AVGTHRESH", String.valueOf(ackThreshold));
+        float avgAck = shared.getFloat(context.getString(R.string.avg_ack), 0);
+        Log.d("AVGACK", String.valueOf(avgAck));
+        if(avgAck > ackThreshold){
                 Intent i = new Intent(context.getApplicationContext(),
                         com.notificationFramework.stimulus.FeedbackStimulus.class);
                 LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context.getApplicationContext());
diff --git a/src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java b/src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
index 964ed7d781db894691b4b9c3487036a7ad3bb6bc..96251c66354e006cd625329a04a3923df5808fb2 100644
--- a/src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
+++ b/src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
@@ -163,7 +163,6 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
                     R.integer.alarm_rc, i, 0);
             am.cancel(pi);
             SaveFile.recordNotification(0, 0, 1, 0, this);
-            getExtraData();
             setUpClock();
             prevSeconds = seconds;
         }
@@ -268,31 +267,7 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
         lbm.sendBroadcast(i);
     }
 
-    private void getExtraData(){
-        SharedPreferences preferences = this.getSharedPreferences(getString(
-                R.string.preference_file_key), Context.MODE_PRIVATE);
-        try {
-            double latitude = Awareness.getSnapshotClient(this).getLocation()
-                    .getResult().getLocation().getLatitude();
-            double longitude = Awareness.getSnapshotClient(this).getLocation()
-                    .getResult().getLocation().getLongitude();
-            List<PlaceLikelihood> placeLikelihoods = Awareness.getSnapshotClient(this)
-                    .getPlaces().getResult().getPlaceLikelihoods();
-            Weather weather = Awareness.getSnapshotClient(this).getWeather().getResult()
-                    .getWeather();
-            SharedPreferences.Editor editor = preferences.edit();
-            editor.putLong(this.getString(R.string.store_lat),Double.doubleToLongBits(latitude));
-            editor.putLong(this.getString(R.string.store_long),Double.doubleToLongBits(longitude));
-            editor.putString(this.getString(R.string.store_place), String.valueOf(placeLikelihoods.get(0).getPlace().getName()));
-            editor.putFloat(this.getString(R.string.store_placelike), placeLikelihoods.get(0).getLikelihood());
-            editor.putFloat(this.getString(R.string.store_temp),weather.getTemperature(Weather.CELSIUS));
-            editor.commit();
-            SaveFile.recordData(latitude, longitude, placeLikelihoods, weather, this);
-        }catch(SecurityException e){
-            Intent i = new Intent(this, RequestPermission.class);
-            startActivity(i);
-        }
-    }
+
 
     /**
      * The method which reponds to a bind request for this service.