diff --git a/.gitignore b/.gitignore
index 603b14077394cd2294ac6922fe619669630ef3ab..7e9e5127b079d22568db60bb2cf2cb8fd7d29881 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
 /captures
 .externalNativeBuild
 .cxx
+*.docx
\ No newline at end of file
diff --git a/IP.code-workspace b/IP.code-workspace
index 876a1499c09dc083612f43c53c0ae71b9c30c5b1..15c77e18b27b0e8d29f4fc32808437f2d186ba07 100644
--- a/IP.code-workspace
+++ b/IP.code-workspace
@@ -4,5 +4,7 @@
 			"path": "."
 		}
 	],
-	"settings": {}
+	"settings": {
+		"java.configuration.updateBuildConfiguration": "automatic"
+	}
 }
\ No newline at end of file
diff --git a/README.md b/README.md
index 93cc24458f459535b67cfc697894bb62d35913ca..41f2327b7ea4fdcd2f8fdb52bdae5a2ebae09d75 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
   - [Keywords](#keywords)
   - [Abstract](#abstract)
   - [Introduction](#introduction)
-  - [Todo](#todo)
+  - [Demonstration](#demonstration)
   - [Directory Structure](#directory-structure)
 
 ## Statement of Originality
@@ -39,17 +39,17 @@ My work did not involve human participants, their cells or data, or animals.
 
 ## Keywords
 
-Abbreviation | Description
----: | ---
-Box | A collection of experiments
-XB | Experiment in a Box (sometimes just experiment)
-In5 | InBodied 5
-MEECS | Move, Eat, Engage, Cogitate and Sleep
-GUI | Graphical User Interface
-JSON | Java Script Object Notation
-Data Structure | JSON Object (sometimes just structure)
-Data Array | An array of data structures
-IDE | Integrated Development Environment
+|   Abbreviation | Description                                     |
+| -------------: | ----------------------------------------------- |
+|            Box | A collection of experiments                     |
+|             XB | Experiment in a Box (sometimes just experiment) |
+|            In5 | InBodied 5                                      |
+|          MEECS | Move, Eat, Engage, Cogitate and Sleep           |
+|            GUI | Graphical User Interface                        |
+|           JSON | Java Script Object Notation                     |
+| Data Structure | JSON Object (sometimes just structure)          |
+|     Data Array | An array of data structures                     |
+|            IDE | Integrated Development Environment              |
 
 ## Abstract
 
@@ -79,14 +79,14 @@ In the two currently released research projects (SleepBetter XB and EatBetter XB
 
 This report focuses on the implementation of a framework application for launching XBs, reducing the overall impact on researchers’ time and attention, and therefore allowing for more research to be produced in this field. The challenges this project will tackle are producing a low storage impact application, with a dynamically produced Graphical User Interface (GUI) that allows for the fast deployment for new XBs from experiments. It also explores how to implement the user side of the XB so that the frameworks can quickly attain new users, without requiring a new application launch. These involve answering the questions of what is important in an XB experience, and what is the information required for an XB to be launched.
 
-## Todo
+## Demonstration
 
-- [x] Update Readme purpose with relevant information
-- [x] Bug fix some of the progress code
-- [x] Update the commits
-- [x] Retrieve a list of commits for the appendix
-- [ ] Set up a test script
-- [ ] Improve Readme with example images etc
+<iframe width="560" height="315"
+src="https://www.youtube.com/embed/watch?v=7fGFl1yc59w" 
+frameborder="0"
+allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" 
+allowfullscreen>
+</iframe>
 
 ## Directory Structure
 
diff --git a/Y3Proj.zip b/Y3Proj.zip
deleted file mode 100644
index fa4eacbf6699c9709f6d21fe0132da95a2f4f35f..0000000000000000000000000000000000000000
Binary files a/Y3Proj.zip and /dev/null differ
diff --git a/app/src/main/java/com/yearthreeproject/xbframework/LoginActivity.java b/app/src/main/java/com/yearthreeproject/xbframework/LoginActivity.java
index c7b3030135540ffd56c28d9c5bdaef13a54d4033..438f954cd804c77445bd5ab9a67ab6bba89fd160 100644
--- a/app/src/main/java/com/yearthreeproject/xbframework/LoginActivity.java
+++ b/app/src/main/java/com/yearthreeproject/xbframework/LoginActivity.java
@@ -111,7 +111,7 @@ public class LoginActivity extends AppCompatActivity {
                         client.getAuth().loginWithCredential(new UserPasswordCredential(email.getText().toString(), finalHashedPassword)).continueWithTask(task -> {
                             if (!task.isSuccessful()) {
                                 Log.e("STITCH", "Login failed!");
-                                client.getAuth().getProviderClient(UserPasswordAuthProviderClient.factory).registerWithEmail(email.getText().toString(), finalHashedPassword);
+                                ProjectMacros.showToast(messageToast, LoginActivity.this, "Username and password combination is incorrect! Make sure you have registered first!");
                                 throw task.getException();
                             }
                             List<Document> docs = new ArrayList<>();
@@ -123,7 +123,7 @@ public class LoginActivity extends AppCompatActivity {
                                 savedSettingsEditor.putBoolean("loggedIn", true);
                                 savedSettingsEditor.apply();
 
-                                // Create users object if doesnt already exist
+                                // Create users object if doesn't already exist
                                 if(task.getResult().size() == 0){
                                     d("dbg_size", String.valueOf(task.getResult().size()));
                                     coll.updateOne(new Document("owner_id", client.getAuth().getUser().getId()),
@@ -151,7 +151,7 @@ public class LoginActivity extends AppCompatActivity {
                                                 finish();
                                             } else {
                                                 task2.getException().printStackTrace();
-                                                finish();
+                                                //finish();
                                             }
                                         });
                                 } else {
@@ -163,14 +163,11 @@ public class LoginActivity extends AppCompatActivity {
                                     } catch (JSONException e) {
                                         e.printStackTrace();
                                     }
-
-
                                     finish();
                                 }
                             } else{
                                 Log.e("STITCH", "Error: " + task.getException().toString());
                                 task.getException().printStackTrace();
-                                finish();
                             }
                         });
                     });
diff --git a/app/src/main/java/com/yearthreeproject/xbframework/NewBoxActivity.java b/app/src/main/java/com/yearthreeproject/xbframework/NewBoxActivity.java
index a1a20c20d376b9551e7dbef817866c27919478eb..6f110292baf4fe84e55b947d8e45f17b62b95768 100644
--- a/app/src/main/java/com/yearthreeproject/xbframework/NewBoxActivity.java
+++ b/app/src/main/java/com/yearthreeproject/xbframework/NewBoxActivity.java
@@ -56,7 +56,6 @@ public class NewBoxActivity extends AppCompatActivity {
     final private List<EditText> groupTitlesEditArray = new ArrayList<>();
     final private List<TextView> groupTitlesViewArray = new ArrayList<>();
     final private List<Button> addExperimentButtonArray = new ArrayList<>();
-    final private List<Button> deleteGroupButtonArray = new ArrayList<>();
     final private List<LinearLayout> groupLinearLayoutArray = new ArrayList<>();
 
     // Experiments within the groups
diff --git a/app/src/main/java/com/yearthreeproject/xbframework/ProgressActivity.java b/app/src/main/java/com/yearthreeproject/xbframework/ProgressActivity.java
index 7a2b2558f49721d3d64a11e127fa89e6746a374b..7fb6344ccfb971ab5bbde91ab7c645a52ad94fd0 100644
--- a/app/src/main/java/com/yearthreeproject/xbframework/ProgressActivity.java
+++ b/app/src/main/java/com/yearthreeproject/xbframework/ProgressActivity.java
@@ -1,5 +1,6 @@
 package com.yearthreeproject.xbframework;
 
+import android.annotation.SuppressLint;
 import android.graphics.Color;
 import android.os.Build;
 import android.os.Bundle;
@@ -10,7 +11,6 @@ import android.widget.LinearLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
-import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.RequiresApi;
 import androidx.appcompat.app.AlertDialog;
@@ -37,6 +37,7 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -86,12 +87,29 @@ public class ProgressActivity extends AppCompatActivity {
     JSONArray archivedExperimentData;
     JSONArray journalArray;
 
+    // Latest experiment variables graph
     String latestExperimentName = null;
     String latestExperimentStartDateString = null;
     String latestExperimentDateString = null;
 
+    // Colour storage for changing over different experiments
     int latestExperimentColor;
 
+    // Global layout variables
+    LinearLayout scrollLayout;
+    LinearLayout journalLayout;
+    LinearLayout calendarLayout;
+    FloatingActionButton journalFAB;
+    ViewGroup coordinateLayout;
+
+    // Graph series
+    LineGraphSeries<DataPoint> lineGraphSeries;
+    PointsGraphSeries<DataPoint> pointsGraphSeries;
+
+    // Global boolean for experiment existence
+    boolean currentExperimentExists;
+    boolean archivedExperimentExists;
+
 
     @Override
     public boolean onSupportNavigateUp() {
@@ -120,22 +138,55 @@ public class ProgressActivity extends AppCompatActivity {
 
         try {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-                initialiseGraphGUI();
+                initialiseGlobalVariables();
                 initialiseJournalGUI();
                 initialiseTabs();
             }
-        } catch (JSONException e) {
+        } catch (JSONException | ParseException e) {
             e.printStackTrace();
         }
     }
 
-    private void initialiseTabs() {
-        final LinearLayout scrollLayout = findViewById(R.id.progressScrollLinLay);
-        final LinearLayout journalLayout = findViewById(R.id.progressJournal);
-        final LinearLayout calendarLayout = findViewById(R.id.calendarLinLay);
-        final FloatingActionButton journalFAB = findViewById(R.id.editCurrentJournal);
-        final ViewGroup coordinateLayout = findViewById(R.id.mainScreen);
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    private void initialiseGlobalVariables() throws JSONException, ParseException {
+        scrollLayout = findViewById(R.id.progressScrollLinLay);
+        journalLayout = findViewById(R.id.progressJournal);
+        calendarLayout = findViewById(R.id.calendarLinLay);
+        journalFAB = findViewById(R.id.editCurrentJournal);
+        coordinateLayout = findViewById(R.id.mainScreen);
+
+        localUserData = new JSONObject(ProjectMacros.readFile(this, "localUserData.json"));
+        currentExperimentData = localUserData.getJSONObject("lockedExperiment").optJSONArray("UserData");
+        archivedExperimentData = localUserData.getJSONArray("archivedExperimentData");
+        journalArray = localUserData.getJSONArray("journal");
+
+        graphSelectedDate = new Date();
+        journalSelectedDate = new Date();
+
+        currentExperimentExists = currentExperimentData != null && localUserData.getBoolean("locked") && currentExperimentData.length() >= 1;
+        archivedExperimentExists = archivedExperimentData != null && archivedExperimentData.length() >= 1;
+
+        List<DataPoint> dataSeries = null;
+
+        if(archivedExperimentExists){ // If there is only archive this will be the latest ran
+            latestExperimentName = archivedExperimentData.getJSONObject(archivedExperimentData.length()-1).getString("Experiment");
+            latestExperimentStartDateString = archivedExperimentData.getJSONObject(archivedExperimentData.length()-1).getString("startDate");
+            latestExperimentDateString = archivedExperimentData.getJSONObject(archivedExperimentData.length()-1).getString("Date");
+            dataSeries = arrayLoopForSelectedDateForData(archivedExperimentData, new ArrayList<>(), latestExperimentName, latestExperimentDateString);
+        }
+        if(currentExperimentExists){ // If there is also currentExperiment this will run latest, making this the highest selected graph
 
+            latestExperimentName = localUserData.getJSONObject("lockedExperiment").getString("Title");
+            latestExperimentStartDateString = currentExperimentData.getJSONObject(currentExperimentData.length()-1).getString("startDate");
+            latestExperimentDateString = currentExperimentData.getJSONObject(currentExperimentData.length()-1).getString("Date");
+            dataSeries = arrayLoopForSelectedDateForData(currentExperimentData, new ArrayList<>(), latestExperimentName, latestExperimentStartDateString);
+        }
+
+        d("dbg_initialSweepSeries", String.valueOf(dataSeries.size()));
+        initialiseGraphGUI(dataSeries);
+    }
+
+    private void initialiseTabs() {
         TabLayout tabLay = findViewById(R.id.tabs);
         tabLay.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
             @Override
@@ -175,12 +226,70 @@ public class ProgressActivity extends AppCompatActivity {
     }
 
     @RequiresApi(api = Build.VERSION_CODES.M)
-    private void initialiseJournalGUI() throws JSONException {
-        final LinearLayout scrollLayout = findViewById(R.id.progressScrollLinLay);
-        final LinearLayout journalLayout = findViewById(R.id.progressJournal);
+    private void initialiseGraphGUI(List<DataPoint> dataSeries) throws JSONException, ParseException {
+        generateGraphCalendar();
 
+        if(currentExperimentExists){
+            generateCurrentExperimentGraph(calendarLayout);
 
+            if(archivedExperimentExists){
+                DataPoint[] series = new DataPoint[0];
+                if (dataSeries != null) {
+                    series = new DataPoint[dataSeries.size()];
+                    for (int i = 0; i < dataSeries.size(); i++) series[i] = dataSeries.get(i);
+                }
+
+                SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
+                Date tempStartDate = sdf.parse(latestExperimentStartDateString);
+                generateSelectedGraph(calendarLayout, series, tempStartDate.getTime());
 
+                String selectedGraphString = "Experiment: " + latestExperimentName;
+                graphSelectedTextView.setText(selectedGraphString);
+
+                generateOverallGraph(calendarLayout);
+            }
+        } else if(archivedExperimentExists){
+            DataPoint[] series = new DataPoint[0];
+            if (dataSeries != null) {
+                series = new DataPoint[dataSeries.size()];
+                for (int i = 0; i < dataSeries.size(); i++) series[i] = dataSeries.get(i);
+            }
+
+            SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
+            Date tempStartDate = sdf.parse(latestExperimentStartDateString);
+            generateSelectedGraph(calendarLayout, series, tempStartDate.getTime());
+
+            String selectedGraphString = "Experiment: " + latestExperimentName;
+            graphSelectedTextView.setText(selectedGraphString);
+
+            generateOverallGraph(calendarLayout);
+        } else {
+            TextView noDataMessage = new TextView(this);
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+                noDataMessage.setTextColor(getColor(R.color.colorPrimary));
+            }
+            noDataMessage.setTextSize(30);
+            noDataMessage.setText(Html.fromHtml("There has been no experiment data to show yet!"));
+            calendarLayout.addView(noDataMessage);
+        }
+
+        if(latestExperimentDateString != null){
+            SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
+            graphSelectedDate = sdf.parse(latestExperimentDateString);
+
+            final SimpleDateFormat dateFormatForMonth = new SimpleDateFormat("MMM - yyyy", Locale.getDefault());
+            graphCalendarView.setCurrentDate(graphSelectedDate);
+            graphMonthTextView.setText(dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth()));
+        } else {
+            final SimpleDateFormat dateFormatForMonth = new SimpleDateFormat("MMM - yyyy", Locale.getDefault());
+            graphCalendarView.setCurrentDate(new Date());
+            graphMonthTextView.setText(dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth()));
+        }
+
+    }
+
+    @RequiresApi(api = Build.VERSION_CODES.M)
+    private void initialiseJournalGUI() throws JSONException {
         generateJournalCalendar(journalLayout);
         journalLayout.addView(ProjectMacros.newHR(this, 10,"#587B7F"));
         generateJournalTodaysEntry(journalLayout);
@@ -189,9 +298,6 @@ public class ProgressActivity extends AppCompatActivity {
         journalLayout.addView(ProjectMacros.newHR(this, 10,"#587B7F"));
         generateJournalExperimentEntries(journalLayout, latestExperimentName, latestExperimentStartDateString);
 
-        final FloatingActionButton journalFAB = findViewById(R.id.editCurrentJournal);
-        final ViewGroup coordinateLayout = findViewById(R.id.mainScreen);
-
         coordinateLayout.removeView(journalFAB);
         scrollLayout.removeView(journalLayout);
 
@@ -373,95 +479,6 @@ public class ProgressActivity extends AppCompatActivity {
         });
     }
 
-    @RequiresApi(api = Build.VERSION_CODES.M)
-    private void initialiseGraphGUI() throws JSONException {
-        graphSelectedDate = new Date();
-        journalSelectedDate = new Date();
-
-        final LinearLayout calendarLayout = findViewById(R.id.calendarLinLay);
-
-        Calendar cal = Calendar.getInstance();
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.HOUR, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-        long startDateLong = cal.getTime().getTime();
-        long highestDateLong = 0;
-
-        localUserData = new JSONObject(ProjectMacros.readFile(this, "localUserData.json"));
-        currentExperimentData = localUserData.getJSONObject("lockedExperiment").optJSONArray("UserData");
-        archivedExperimentData = localUserData.getJSONArray("archivedExperimentData");
-        journalArray = localUserData.getJSONArray("journal");
-        generateGraphCalendar(calendarLayout);
-
-        List<DataPoint> dataSeries = null;
-
-        if(currentExperimentData != null && localUserData.getBoolean("locked") && currentExperimentData.length() >= 1){
-
-            generateCurrentExperimentGraph(calendarLayout);
-
-            latestExperimentName = localUserData.getJSONObject("lockedExperiment").getString("Title");
-            dataSeries = loopJSONArrayForPoints(currentExperimentData, new ArrayList<>());
-            latestExperimentStartDateString = currentExperimentData.getJSONObject(0).getString("startDate");
-            latestExperimentDateString = currentExperimentData.getJSONObject(currentExperimentData.length()-1).getString("Date");
-
-        } else if(archivedExperimentData != null && archivedExperimentData.length() >= 1){
-            highestDateLong = cal.getTime().getTime();
-            int highestIndex = 0;
-
-            for(int i = 0; i < archivedExperimentData.length(); i++){
-                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(0, 2)));
-                cal.set(Calendar.MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(3, 5)) - 1);
-                cal.set(Calendar.YEAR, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(6, 10)));
-                long calNow = cal.getTime().getTime();
-                if (i == 0 || calNow >= highestDateLong) {
-                    highestDateLong = calNow;
-                    highestIndex = i;
-                }
-            }
-            latestExperimentName = archivedExperimentData.getJSONObject(highestIndex).getString("Experiment");
-            latestExperimentStartDateString = archivedExperimentData.getJSONObject(highestIndex).getString("startDate");
-            latestExperimentDateString = archivedExperimentData.getJSONObject(highestIndex).getString("Date");
-
-            Calendar tempTime = Calendar.getInstance();
-            tempTime.setTimeInMillis(highestDateLong);
-
-            startDateLong = arrayLoopForSelectedDateStartDate(archivedExperimentData, tempTime.getTime());
-            dataSeries = arrayLoopForSelectedDateForData(archivedExperimentData, new ArrayList<>(), latestExperimentName, startDateLong);
-        } else {
-            TextView noDataMessage = new TextView(this);
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-                noDataMessage.setTextColor(getColor(R.color.colorPrimary));
-            }
-            noDataMessage.setTextSize(30);
-            noDataMessage.setText(Html.fromHtml("There has been no experiment data to show yet!"));
-            calendarLayout.addView(noDataMessage);
-        }
-
-        if((currentExperimentData != null && localUserData.getBoolean("locked") && currentExperimentData.length() >= 1) || (archivedExperimentData != null && archivedExperimentData.length() >= 1)){
-            DataPoint[] series = new DataPoint[0];
-            if (dataSeries != null) {
-                series = new DataPoint[dataSeries.size()];
-            }
-
-            if (dataSeries != null) {
-                for (int i = 0; i < dataSeries.size(); i++) series[i] = dataSeries.get(i);
-            }
-
-            generateSelectedGraph(calendarLayout, series, startDateLong, latestExperimentStartDateString);
-
-            String selectedGraphString = "Experiment: " + latestExperimentName;
-            graphSelectedTextView.setText(selectedGraphString);
-
-            generateOverallGraph(calendarLayout);
-        }
-
-        graphSelectedDate = new Date(highestDateLong);
-        final SimpleDateFormat dateFormatForMonth = new SimpleDateFormat("MMM - yyyy", Locale.getDefault());
-        graphCalendarView.setCurrentDate(graphSelectedDate);
-        graphMonthTextView.setText(dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth()));
-    }
-
     @RequiresApi(api = Build.VERSION_CODES.KITKAT)
     private void generateJournalExperimentEntries(LinearLayout parent, String experiment, String startDate) throws JSONException {
         if(journalExperimentHistoryLayout == null){
@@ -671,7 +688,6 @@ public class ProgressActivity extends AppCompatActivity {
         int experimentCount = 0;
 
         if(journalArray != null){
-            d("dbg_jourNNull", "true");
             for(int i = 0; i < journalArray.length(); i++){
                 if(i == 0) oldExperiment = journalArray.getJSONObject(i).getString("Experiment");
                 if(experimentCount == 5){
@@ -700,9 +716,6 @@ public class ProgressActivity extends AppCompatActivity {
                 }
                 journalCalendarView.addEvent(new Event(Color.parseColor(markColor[markColorIndex%3]), cal.getTimeInMillis(), journalArray.getJSONObject(i).getString("Experiment")));
             }
-        } else {
-            d("dbg_jourNNull", "false");
-            d("dbg_journal", journalArray.toString());
         }
         latestExperimentColor = Color.parseColor(markColor[markColorIndex%3]);
 
@@ -767,7 +780,7 @@ public class ProgressActivity extends AppCompatActivity {
     }
 
     @RequiresApi(api = Build.VERSION_CODES.M)
-    private void generateGraphCalendar(final LinearLayout parent) throws JSONException{
+    private void generateGraphCalendar() throws JSONException{
         graphCalendarView = findViewById(R.id.compactCalendarGraph);
         graphCalendarView.setFirstDayOfWeek(Calendar.MONDAY);
         final SimpleDateFormat dateFormatForMonth = new SimpleDateFormat("MMM - yyyy", Locale.getDefault());
@@ -777,134 +790,104 @@ public class ProgressActivity extends AppCompatActivity {
         graphMonthTextView.setTextColor(getColor(R.color.colorPrimary));
         graphMonthTextView.setTextSize(35);
         graphMonthTextView.setText(Month[0]);
-        parent.addView(graphMonthTextView, 0);
-        parent.addView(ProjectMacros.newHR(this, 10, "#587B7F"));
-
-        Calendar cal = Calendar.getInstance();
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.HOUR, 0);
+        calendarLayout.addView(graphMonthTextView, 0);
+        calendarLayout.addView(ProjectMacros.newHR(this, 10, "#587B7F"));
 
         final String[] markColor = {"#8FFF0000","#8F0A8F0F","#8F0000FF"};
         int markColorIndex = 0;
-        String oldExperiment = "";
-        int experimentCount = 0;
 
-        if(archivedExperimentData != null){
-            for(int i = 0; i < archivedExperimentData.length(); i++){
-                if(i == 0) oldExperiment = archivedExperimentData.getJSONObject(i).getString("Experiment");
-                if(experimentCount == 5){
-                    markColorIndex++;
-                    experimentCount = 0;
-                    oldExperiment = archivedExperimentData.getJSONObject(i).getString("Experiment");
-                }
-                experimentCount++;
+        Calendar queryCal = Calendar.getInstance();
+        queryCal.set(Calendar.MINUTE, 0);
+        queryCal.set(Calendar.SECOND, 0);
+        queryCal.set(Calendar.HOUR, 0);
+        queryCal.set(Calendar.MILLISECOND, 0);
 
-                d("dbg_exCount", String.valueOf(experimentCount));
+        if(archivedExperimentExists){
+            String oldExperimentStartDate = archivedExperimentData.getJSONObject(0).getString("startDate");
+            int experimentCount = 0;
 
-                if(!archivedExperimentData.getJSONObject(i).getString("Experiment").equals(oldExperiment)){
+            for(int i = 0; i < archivedExperimentData.length(); i++){
+                queryCal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(0,2)));
+                queryCal.set(Calendar.MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(3,5))-1);
+                queryCal.set(Calendar.YEAR, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(6,10)));
+                if(experimentCount++ == 5 || !(archivedExperimentData.getJSONObject(i).getString("startDate").equals(oldExperimentStartDate))){
                     markColorIndex++;
                     experimentCount = 0;
-                    oldExperiment = archivedExperimentData.getJSONObject(i).getString("Experiment");
+                    oldExperimentStartDate = archivedExperimentData.getJSONObject(i).getString("startDate");
                 }
 
-                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(0,2)));
-                cal.set(Calendar.MONTH, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(3,5))-1);
-                cal.set(Calendar.YEAR, Integer.parseInt(archivedExperimentData.getJSONObject(i).getString("Date").substring(6,10)));
-
-                if(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) == cal.get(Calendar.DAY_OF_MONTH)
-                        && Calendar.getInstance().get(Calendar.MONTH) == cal.get(Calendar.MONTH)
-                        && Calendar.getInstance().get(Calendar.YEAR) == cal.get(Calendar.YEAR)){
+                if(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) == queryCal.get(Calendar.DAY_OF_MONTH)
+                        && Calendar.getInstance().get(Calendar.MONTH) == queryCal.get(Calendar.MONTH)
+                        && Calendar.getInstance().get(Calendar.YEAR) == queryCal.get(Calendar.YEAR)){ // If the date is today
                     graphCalendarView.setCurrentDayBackgroundColor(Color.parseColor(markColor[markColorIndex%3]));
                 }
-                graphCalendarView.addEvent(new Event(Color.parseColor(markColor[markColorIndex%3]), cal.getTimeInMillis(), archivedExperimentData.getJSONObject(i).getString("Experiment")));
+                graphCalendarView.addEvent(new Event(Color.parseColor(markColor[markColorIndex%3]), queryCal.getTimeInMillis(), archivedExperimentData.getJSONObject(i).getString("Experiment")));
             }
 
             markColorIndex++;
         }
 
-        if(currentExperimentData != null){
+        if(currentExperimentExists){
             for(int i = 0; i < currentExperimentData.length(); i++){
-                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(0,2)));
-                cal.set(Calendar.MONTH, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(3,5))-1);
-                cal.set(Calendar.YEAR, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(6,10)));
+                queryCal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(0,2)));
+                queryCal.set(Calendar.MONTH, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(3,5))-1);
+                queryCal.set(Calendar.YEAR, Integer.parseInt(currentExperimentData.getJSONObject(i).getString("Date").substring(6,10)));
 
-                if(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) == cal.get(Calendar.DAY_OF_MONTH)
-                        && Calendar.getInstance().get(Calendar.MONTH) == cal.get(Calendar.MONTH)
-                        && Calendar.getInstance().get(Calendar.YEAR) == cal.get(Calendar.YEAR)){
+                if(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) == queryCal.get(Calendar.DAY_OF_MONTH)
+                        && Calendar.getInstance().get(Calendar.MONTH) == queryCal.get(Calendar.MONTH)
+                        && Calendar.getInstance().get(Calendar.YEAR) == queryCal.get(Calendar.YEAR)){ // If the date is today
                     graphCalendarView.setCurrentDayBackgroundColor(Color.parseColor(markColor[markColorIndex%3]));
                 }
-                graphCalendarView.addEvent(new Event(Color.parseColor(markColor[markColorIndex%3]), cal.getTimeInMillis()));
+                graphCalendarView.addEvent(new Event(Color.parseColor(markColor[markColorIndex%3]), queryCal.getTimeInMillis()));
             }
         }
 
         graphCalendarView.setListener(new CompactCalendarView.CompactCalendarViewListener() {
             @Override
             public void onDayClick(Date dateClicked) {
-                graphCalendarView.setCurrentSelectedDayBackgroundColor(getColor(R.color.colorPrimary));
-                if(graphCalendarView.getEvents(dateClicked).size() == 0){
-                    ProjectMacros.showToast(progressToast, ProgressActivity.this, "Cannot select a date without data!");
-
-                    graphCalendarView.setCurrentDate(graphSelectedDate);
-                    Month[0] = dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth());
-                    graphMonthTextView.setText(Month[0]);
-                } else {
-                    graphSelectedDate = dateClicked;
-                    Month[0] = dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth());
-                    graphMonthTextView.setText(Month[0]);
-
-                    long lowest = 0;
+                try{
+                    graphCalendarView.setCurrentSelectedDayBackgroundColor(getColor(R.color.colorPrimary));
+                    if(graphCalendarView.getEvents(dateClicked).size() == 0){
+                        ProjectMacros.showToast(progressToast, ProgressActivity.this, "Cannot select a date without data!");
 
-                    try {
+                        graphCalendarView.setCurrentDate(graphSelectedDate);
+                        Month[0] = dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth());
+                        graphMonthTextView.setText(Month[0]);
+                    } else {
+                        graphSelectedDate = dateClicked;
+                        Month[0] = dateFormatForMonth.format(graphCalendarView.getFirstDayOfCurrentMonth());
+                        graphMonthTextView.setText(Month[0]);
                         List<DataPoint> dataSeries;
                         String experimentName;
                         long startDate = 0;
-                        String startDateString = null;
 
                         if(graphCalendarView.getEvents(dateClicked).get(0).getData() != null){
                             experimentName = (String) graphCalendarView.getEvents(dateClicked).get(0).getData();
                             startDate = arrayLoopForSelectedDateStartDate(archivedExperimentData, dateClicked);
-                            startDateString = arrayLoopForSelectedDateStartDateString(archivedExperimentData, dateClicked);
-                            dataSeries = arrayLoopForSelectedDateForData(archivedExperimentData, new ArrayList<>(), experimentName, startDate);
+                            Date tempDate = new Date(startDate);
+                            SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
+                            dataSeries = arrayLoopForSelectedDateForData(archivedExperimentData, new ArrayList<>(), experimentName, sdf.format(tempDate));
                         } else {
                             experimentName = localUserData.getJSONObject("lockedExperiment").getString("Title");
                             dataSeries = loopJSONArrayForPoints(currentExperimentData, new ArrayList<>());
-                            lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
                         }
 
                         DataPoint[] series = new DataPoint[0];
                         if (dataSeries != null) {
                             series = new DataPoint[dataSeries.size()];
-                        }
-                        if (dataSeries != null) {
                             for (int i = 0; i < dataSeries.size(); i++) {
                                 series[i] = dataSeries.get(i);
                             }
                         }
 
-                        if(graphCalendarView.getEvents(dateClicked).get(0).getData() != null){
-                            generateSelectedGraph(parent, series, startDate, startDateString);
-                        } else {
-                            generateSelectedGraph(parent, series, lowest, startDateString);
-                        }
+                        generateSelectedGraph(calendarLayout, series, startDate);
 
                         String graphTitleString = "Experiment: " + experimentName;
                         graphSelectedTextView.setText(graphTitleString);
-                    } catch(JSONException e){
-                        e.printStackTrace();
-                    }
-                }
-            }
-
-            private String arrayLoopForSelectedDateStartDateString(JSONArray array, Date match) throws JSONException{
-                SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/YYYY", Locale.getDefault());
-
-                for (int i = 0; i < array.length(); i++) {
-                    if (sdf.format(match).equals(array.getJSONObject(i).getString("Date"))) {
-                        return array.getJSONObject(i).getString("startDate");
                     }
+                } catch (JSONException | ParseException e){
+                    e.printStackTrace();
                 }
-                return null;
             }
 
             @Override
@@ -926,21 +909,12 @@ public class ProgressActivity extends AppCompatActivity {
         });
     }
 
+    @SuppressLint("NewApi")
     @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-    private void generateSelectedGraph(LinearLayout parent, DataPoint[] series, long lowest, String startDateString){
-
-        d("dbg_startDate", startDateString);
-
-        for (DataPoint point : series) {
-            d("dbg_seriesPoint", String.valueOf(point.getX()));
-        }
-
-
+    private void generateSelectedGraph(LinearLayout parent, DataPoint[] series, long lowest){
         if(graphSelectedGraphView == null) {
             graphSelectedTextView = new TextView(this);
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-                graphSelectedTextView.setTextColor(getColor(R.color.colorPrimary));
-            }
+            graphSelectedTextView.setTextColor(getColor(R.color.colorPrimary));
             graphSelectedTextView.setTextSize(30);
             graphSelectedTextView.setText(Html.fromHtml("Selected Experiment"));
             parent.addView(graphSelectedTextView);
@@ -949,72 +923,79 @@ public class ProgressActivity extends AppCompatActivity {
             graphSelectedGraphView.setMinimumHeight(300);
             parent.addView(graphSelectedGraphView);
             parent.addView(ProjectMacros.newHR(this, 4, "#587B7F"));
-        } else {
-            graphSelectedGraphView.removeAllSeries();
         }
-        LineGraphSeries<DataPoint> series1 = new LineGraphSeries< >(series);
-        PointsGraphSeries<DataPoint> series2 = new PointsGraphSeries<>(series);
 
-        series2.setCustomShape((canvas, paint, x, y, dataPoint) -> {
-            paint.setStrokeWidth(7);
-            canvas.drawLine(x-15, y-15, x+15, y+15, paint);
-            canvas.drawLine(x+15, y-15, x-15, y+15, paint);
-        });
+        if(lineGraphSeries == null || pointsGraphSeries == null){
+            lineGraphSeries = new LineGraphSeries<>(series);
+            pointsGraphSeries = new PointsGraphSeries<>(series);
 
-        graphSelectedGraphView.addSeries(series1);
-        graphSelectedGraphView.addSeries(series2);
+            pointsGraphSeries.setCustomShape((canvas, paint, x, y, dataPoint) -> {
+                paint.setStrokeWidth(7);
+                canvas.drawLine(x-15, y-15, x+15, y+15, paint);
+                canvas.drawLine(x+15, y-15, x-15, y+15, paint);
+            });
+
+            graphSelectedGraphView.addSeries(lineGraphSeries);
+            graphSelectedGraphView.addSeries(pointsGraphSeries);
+            graphSettings(graphSelectedGraphView, lowest, 4);
+        } else {
+            lineGraphSeries.resetData(series);
+            pointsGraphSeries.resetData(series);
+            graphSelectedGraphView.getViewport().setMinX(lowest-12*60*60*1000-1000);
+            graphSelectedGraphView.getViewport().setMaxX(lowest+4*24*60*60*1000-12*60*60*1000+2000);
+        }
 
-        graphSettings(graphSelectedGraphView, lowest, 4);
     }
 
+    @SuppressLint("NewApi")
     @RequiresApi(api = Build.VERSION_CODES.KITKAT)
     private void generateCurrentExperimentGraph(LinearLayout parent) throws JSONException{
         graphCurrentTextView = new TextView(this);
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-            graphCurrentTextView.setTextColor(getColor(R.color.colorPrimary));
-        }
+        graphCurrentTextView.setTextColor(getColor(R.color.colorPrimary));
         graphCurrentTextView.setTextSize(30);
         parent.addView(graphCurrentTextView);
 
-        GraphView selectedExperimentGraph = new GraphView(this);
-        selectedExperimentGraph.setMinimumHeight(300);
-        parent.addView(selectedExperimentGraph);
-        selectedExperimentGraph.removeAllSeries();
+        GraphView currentGraphView = new GraphView(this);
+        currentGraphView.setMinimumHeight(300);
+        parent.addView(currentGraphView);
+        currentGraphView.removeAllSeries();
 
         parent.addView(ProjectMacros.newHR(this, 4, "#587B7F"));
 
         long lowest = 0;
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.HOUR, 0);
 
-        if (currentExperimentData != null) {
-            Calendar cal = Calendar.getInstance();
-            cal.set(Calendar.MINUTE, 0);
-            cal.set(Calendar.SECOND, 0);
-            cal.set(Calendar.HOUR, 0);
-
-            SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/YYYY", Locale.getDefault());
+        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/YYYY", Locale.getDefault());
 
-            String currentExperimentText = localUserData.getJSONObject("lockedExperiment").getString("Title") + " (" + sdf.format(cal.getTime()) + "):";
-            graphCurrentTextView.setText(currentExperimentText);
+        String currentExperimentText = localUserData.getJSONObject("lockedExperiment").getString("Title") + " (" + sdf.format(cal.getTime()) + "):";
+        graphCurrentTextView.setText(currentExperimentText);
 
-            DataPoint[] dataSeries;
+        List<DataPoint> dataSeries;
 
-            dataSeries = loopJSONArrayForPoints(currentExperimentData, new DataPoint[currentExperimentData.length()], 0);
-            lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
+        dataSeries = loopJSONArrayForPoints(currentExperimentData, new ArrayList<>());
+        lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
 
-            LineGraphSeries <DataPoint> series1 = new LineGraphSeries< >(dataSeries);
-            PointsGraphSeries <DataPoint> series2 = new PointsGraphSeries<>(dataSeries);
-            series2.setCustomShape((canvas, paint, x, y, dataPoint) -> {
+        DataPoint[] series;
+        if (dataSeries != null) {
+            series = new DataPoint[dataSeries.size()];
+            for (int i = 0; i < dataSeries.size(); i++) {
+                series[i] = dataSeries.get(i);
+            }
+            LineGraphSeries<DataPoint> currentLineGraphSeries = new LineGraphSeries<>(series);
+            PointsGraphSeries<DataPoint> currentPointsGraphSeries = new PointsGraphSeries<>(series);
+            currentPointsGraphSeries.setCustomShape((canvas, paint, x, y, dataPoint) -> {
                 paint.setStrokeWidth(7);
                 canvas.drawLine(x-15, y-15, x+15, y+15, paint);
                 canvas.drawLine(x+15, y-15, x-15, y+15, paint);
             });
+            currentGraphView.addSeries(currentLineGraphSeries);
+            currentGraphView.addSeries(currentPointsGraphSeries);
 
-            if(dataSeries.length == 0) selectedExperimentGraph.setTitle("No data! Answer a survey to display data!");
-            selectedExperimentGraph.addSeries(series1);
-            selectedExperimentGraph.addSeries(series2);
-        }
-        graphSettings(selectedExperimentGraph, lowest, 4);
-
+        } else currentGraphView.setTitle("No data! Answer a survey to display data!");
+        graphSettings(currentGraphView, lowest, 4);
     }
 
     @RequiresApi(api = Build.VERSION_CODES.KITKAT)
@@ -1035,28 +1016,41 @@ public class ProgressActivity extends AppCompatActivity {
 
         long lowest = 0;
 
-        DataPoint[] dataSeries = null;
-
-        if(archivedExperimentData != null){
-            if(archivedExperimentData.length() >= 1){
-                if(currentExperimentData != null){
-                    if(currentExperimentData.length() >= 1) {
-                        dataSeries = loopJSONArrayForPoints(archivedExperimentData, new DataPoint[currentExperimentData.length() + archivedExperimentData.length()], 0);
-                        lowest = loopJSONArrayForLowest(archivedExperimentData, lowest);
-                        dataSeries = loopJSONArrayForPoints(currentExperimentData, dataSeries, archivedExperimentData.length());
-                        lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
-                    }
-                } else {
-                    dataSeries = loopJSONArrayForPoints(archivedExperimentData, new DataPoint[archivedExperimentData.length()], 0);
-                    lowest = loopJSONArrayForLowest(archivedExperimentData, lowest);
-                }
+        List<DataPoint> dataSeries;
 
+        if(archivedExperimentData != null && archivedExperimentData.length() >= 1){
+            if(currentExperimentData != null && currentExperimentData.length() >= 1){
+                dataSeries = loopJSONArrayForPoints(archivedExperimentData, new ArrayList<>());
+                lowest = loopJSONArrayForLowest(archivedExperimentData, lowest);
+                dataSeries = loopJSONArrayForPoints(currentExperimentData, dataSeries);
+                lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
+            } else {
+                dataSeries = loopJSONArrayForPoints(archivedExperimentData, new ArrayList<>());
+                lowest = loopJSONArrayForLowest(archivedExperimentData, lowest);
+            }
+        } else {
+            if(currentExperimentData != null && currentExperimentData.length() >= 1){
+                dataSeries = loopJSONArrayForPoints(currentExperimentData, new ArrayList<>());
+                lowest = loopJSONArrayForLowest(currentExperimentData, lowest);
+            } else {
+                dataSeries = null;
             }
         }
 
         assert dataSeries != null;
-        LineGraphSeries <DataPoint> series1 = new LineGraphSeries< >(dataSeries);
-        PointsGraphSeries <DataPoint> series2 = new PointsGraphSeries<>(dataSeries);
+
+        DataPoint[] series = new DataPoint[0];
+        if (dataSeries != null) {
+            series = new DataPoint[dataSeries.size()];
+        }
+        if (dataSeries != null) {
+            for (int i = 0; i < dataSeries.size(); i++) {
+                series[i] = dataSeries.get(i);
+            }
+        }
+
+        LineGraphSeries <DataPoint> series1 = new LineGraphSeries<>(series);
+        PointsGraphSeries <DataPoint> series2 = new PointsGraphSeries<>(series);
         series2.setCustomShape((canvas, paint, x, y, dataPoint) -> {
             paint.setStrokeWidth(7);
             canvas.drawLine(x-15, y-15, x+15, y+15, paint);
@@ -1069,21 +1063,29 @@ public class ProgressActivity extends AppCompatActivity {
         overallGraph.getViewport().scrollToEnd();
     }
 
-    private DataPoint[] loopJSONArrayForPoints(JSONArray array, DataPoint[] dataSeries, int offset) throws JSONException{
-        Calendar cal = Calendar.getInstance();
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.HOUR, 0);
+    private void graphSettings(GraphView graph, long lowest, int dayRange){
+        graph.getGridLabelRenderer().setLabelFormatter(new DateAsXAxisLabelFormatter(this));
+        graph.getGridLabelRenderer().setNumHorizontalLabels(5);
 
-        for(int i = 0; i < array.length(); i++){
-            cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(0,2)));
-            cal.set(Calendar.MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(3,5))-1);
-            cal.set(Calendar.YEAR, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(6,10)));
+        graph.getViewport().setMaxY(5);
+        graph.getViewport().setMinY(1);
+        graph.getViewport().setYAxisBoundsManual(true);
+
+        setGraphAxis(graph, lowest, dayRange);
+
+        graph.getViewport().setScalable(false);
+        graph.getViewport().setScrollable(true);
+
+        graph.getViewport().setXAxisBoundsManual(true);
+        graph.getGridLabelRenderer().setHumanRounding(false);
+
+        graph.onDataChanged(true, false);
+    }
+
+    private void setGraphAxis(GraphView graph, long lowest, int dayRange){
+        graph.getViewport().setMinX(lowest-1000);
+        graph.getViewport().setMaxX(lowest+dayRange*24*60*60*1000+2000);
 
-            Date tempDate = cal.getTime();
-            dataSeries[i + offset] =  new DataPoint(tempDate, Double.parseDouble(array.getJSONObject(i).getString("AverageResult")));
-        }
-        return dataSeries;
     }
 
     private List<DataPoint> loopJSONArrayForPoints(JSONArray array, List<DataPoint> dataSeries) throws JSONException{
@@ -1124,52 +1126,40 @@ public class ProgressActivity extends AppCompatActivity {
         return lowest;
     }
 
-    private void graphSettings(GraphView graph, long lowest, int dayRange){
-        graph.getGridLabelRenderer().setLabelFormatter(new DateAsXAxisLabelFormatter(this));
-        graph.getGridLabelRenderer().setNumHorizontalLabels(5);
-
-        graph.getViewport().setMaxY(5);
-        graph.getViewport().setMinY(1);
-        graph.getViewport().setYAxisBoundsManual(true);
 
-        graph.getViewport().setMinX(lowest-2500);
-        graph.getViewport().setScalable(false);
-        graph.getViewport().setScrollable(true);
+    private List<DataPoint> arrayLoopForSelectedDateForData(JSONArray array, List<DataPoint> dataSeries, String experimentName, String experimentStartDate) throws JSONException, ParseException {
+        Calendar queryCal = Calendar.getInstance();
+        queryCal.set(Calendar.MINUTE, 0);
+        queryCal.set(Calendar.SECOND, 0);
+        queryCal.set(Calendar.HOUR_OF_DAY, 0);
+        queryCal.set(Calendar.MILLISECOND, 0);
 
-        graph.getViewport().setMaxX(lowest+dayRange*24*60*60*1000+2500);
-        graph.getViewport().setXAxisBoundsManual(true);
-        graph.getGridLabelRenderer().setHumanRounding(false);
-    }
-
-    private List<DataPoint> arrayLoopForSelectedDateForData(JSONArray array, List<DataPoint> dataSeries, String match, long startDate) throws JSONException{
-        Calendar cal = Calendar.getInstance();
         Calendar startCal = Calendar.getInstance();
-
         startCal.set(Calendar.MINUTE, 0);
         startCal.set(Calendar.SECOND, 0);
-        startCal.set(Calendar.HOUR, 0);
+        startCal.set(Calendar.HOUR_OF_DAY, 0);
+        startCal.set(Calendar.MILLISECOND, 0);
 
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.HOUR, 0);
+        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", Locale.getDefault());
 
         for (int i = 0; i < array.length(); i++) {
-            if (match.equals(array.getJSONObject(i).getString("Experiment"))) {
-                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(0,2)));
-                cal.set(Calendar.MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(3,5))-1);
-                cal.set(Calendar.YEAR, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(6,10)));
+            if (experimentName.equals(array.getJSONObject(i).getString("Experiment"))) {
+                queryCal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(0,2)));
+                queryCal.set(Calendar.MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(3,5))-1);
+                queryCal.set(Calendar.YEAR, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(6,10)));
 
                 startCal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(array.getJSONObject(i).getString("startDate").substring(0,2)));
                 startCal.set(Calendar.MONTH, Integer.parseInt(array.getJSONObject(i).getString("startDate").substring(3,5))-1);
                 startCal.set(Calendar.YEAR, Integer.parseInt(array.getJSONObject(i).getString("startDate").substring(6,10)));
 
-                if(startDate == startCal.getTimeInMillis()){
-                    Date tempDate = cal.getTime();
+                if(sdf.parse(experimentStartDate).getTime() == startCal.getTime().getTime()){
+                    Date tempDate = queryCal.getTime();
                     dataSeries.add(new DataPoint(tempDate, Double.parseDouble(array.getJSONObject(i).getString("AverageResult"))));
                 }
             }
         }
         return dataSeries;
+
     }
 
     private long arrayLoopForSelectedDateStartDate(JSONArray array, Date dateClicked) throws JSONException {
@@ -1191,24 +1181,4 @@ public class ProgressActivity extends AppCompatActivity {
         return cal.getTime().getTime();
     }
 
-    private long arrayLoopForSelectedDateForLowest(@NonNull JSONArray array, long lowest, String match) throws JSONException{
-        Calendar cal = Calendar.getInstance();
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.HOUR, 0);
-
-        int addedIndex = 0;
-
-        for (int i = 0; i < array.length(); i++) {
-            if (match.equals(array.getJSONObject(i).getString("Experiment"))) {
-                cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(0,2)));
-                cal.set(Calendar.MONTH, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(3,5))-1);
-                cal.set(Calendar.YEAR, Integer.parseInt(array.getJSONObject(i).getString("Date").substring(6,10)));
-
-                long calNow = cal.getTime().getTime();
-                if (addedIndex++ == 0 || calNow <= lowest) lowest = calNow;
-            }
-        }
-        return lowest;
-    }
 }
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index c73d2393ba8872e777f00d473d25d9049e53dcde..623905bb74573ca52bd60b46e7e5347c180bc8ef 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,3 +17,5 @@ org.gradle.jvmargs=-Xmx1536m
 android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
+
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
diff --git a/reports/final/Project Report Body.docx b/reports/final/Project Report Body.docx
deleted file mode 100644
index 6c65e49e7f204ebde23d10809c0bc754d6a58a83..0000000000000000000000000000000000000000
Binary files a/reports/final/Project Report Body.docx and /dev/null differ
diff --git a/reports/final/Project Report Body.pdf b/reports/final/Project Report Body.pdf
index 38d53b74512755c8a816a568a03809beef82ba0d..9c16d0482805807a1fc69a611d1ee04cf00fa178 100644
Binary files a/reports/final/Project Report Body.pdf and b/reports/final/Project Report Body.pdf differ
diff --git a/reports/final/Project Report.docx b/reports/final/Project Report.docx
index 6c65e49e7f204ebde23d10809c0bc754d6a58a83..bbb8d772c6bc53bb7686374420a5abb85761c8fe 100644
Binary files a/reports/final/Project Report.docx and b/reports/final/Project Report.docx differ
diff --git a/reports/final/Project Report.pdf b/reports/final/Project Report.pdf
index b1fdd996d23aae724c408051e367afef49fc69dc..964161faa0fe946c02d2786f91a216c60fde3f38 100644
Binary files a/reports/final/Project Report.pdf and b/reports/final/Project Report.pdf differ
diff --git a/reports/progress/Progress Report Body.docx b/reports/progress/Progress Report Body.docx
deleted file mode 100644
index 2b5d3d406a4c039d691bfd7964ccc4d5cbf6c065..0000000000000000000000000000000000000000
Binary files a/reports/progress/Progress Report Body.docx and /dev/null differ
diff --git a/reports/progress/ShorterReportBody.pdf b/reports/progress/ShorterReportBody.pdf
deleted file mode 100644
index a3bb3c842f63887eae2314953ec15adb116a944c..0000000000000000000000000000000000000000
Binary files a/reports/progress/ShorterReportBody.pdf and /dev/null differ
diff --git a/reports/project brief/Project Brief.docx b/reports/project brief/Project Brief.docx
deleted file mode 100644
index 22c822da06e4affb00f19d7e87034a4364103357..0000000000000000000000000000000000000000
Binary files a/reports/project brief/Project Brief.docx and /dev/null differ