diff --git a/binarycpython/tests/main.py b/binarycpython/tests/main.py
index 9d7e00f632b5b42ac96c21ced287609a3d7f622f..abafd95b221ca038e06521ed47a79c4f7198e336 100755
--- a/binarycpython/tests/main.py
+++ b/binarycpython/tests/main.py
@@ -5,7 +5,6 @@ Main file for the tests. This file imports all the combined_test functions from
 
 import unittest
 
-
 from binarycpython.tests.test_c_bindings import *
 from binarycpython.tests.test_custom_logging import *
 from binarycpython.tests.test_distributions import *
@@ -18,6 +17,7 @@ from binarycpython.tests.test_spacing_functions import *
 from binarycpython.tests.test_useful_funcs import *
 from binarycpython.tests.test_grid_options_defaults import *
 from binarycpython.tests.test_stellar_types import *
+from test_notebooks import *
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_custom_logging.py b/binarycpython/tests/test_custom_logging.py
index 9e9600f4105f95848ce3be951e7d2217a81a6e76..17f54545f0941c2a5dbb8db823d6e12bafb958d0 100644
--- a/binarycpython/tests/test_custom_logging.py
+++ b/binarycpython/tests/test_custom_logging.py
@@ -128,7 +128,7 @@ class test_custom_logging(unittest.TestCase):
 
         input_2 = "version"
         output_2 = from_binary_c_config(BINARY_C_CONFIG, input_2)
-        self.assertIn(output_2, ["2.1.7", "2.2pre1"], msg="binary_c version doesnt match")
+        self.assertIn(output_2, ["2.1.7", "2.2pre1", "2.2.0", "2.2.1"], msg="binary_c version doesnt match")
 
     def test_return_compilation_dict(self):
         with Capturing() as output:
diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py
index c1c2379beea2d2facf824381440234b89389a138..5a1caf4cee196eed44bf03d894d5371bb0711f6b 100644
--- a/binarycpython/utils/functions.py
+++ b/binarycpython/utils/functions.py
@@ -10,6 +10,7 @@ Tasks:
 
 import json
 import os
+import gc
 import tempfile
 import copy
 import inspect
@@ -73,6 +74,35 @@ def get_size(obj, seen=None):
         size += sum([get_size(i, seen) for i in obj])
     return size
 
+
+def format_ensemble_results(ensemble_dictionary):
+    """
+    Function to handle all the steps of formatting the ensemble output again.
+
+    Input:
+        ensemble_dictionary: dictionary containing all the ensemble results
+    """
+
+    original_ensemble_results = ensemble_dictionary
+
+    float_format_ensemble_results = recursive_change_key_to_float(original_ensemble_results)
+    del original_ensemble_results
+    gc.collect()
+
+    # Then sort the dictionary
+    sorted_ensemble_results = custom_sort_dict(float_format_ensemble_results)
+    del float_format_ensemble_results
+    gc.collect()
+
+    # Then Change the keys back to a string but with a %g format.
+    reformatted_ensemble_results = recursive_change_key_to_string(sorted_ensemble_results)
+    del sorted_ensemble_results
+    gc.collect()
+
+    # Put back in the dictionary
+    return reformatted_ensemble_results
+
+
 def subtract_dicts(dict_1: dict, dict_2: dict) -> dict:
     """
     Function to subtract two dictionaries.
diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index c0bfae70ae996d079c6fc2c28fdf348d8919b333..d027b8a4cd4858ad26a06fd98fef274922f47c57 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -72,6 +72,7 @@ from binarycpython.utils.functions import (
     custom_sort_dict,
     recursive_change_key_to_string,
     multiply_values_dict,
+    format_ensemble_results,
 )
 
 
@@ -961,33 +962,6 @@ class Population:
         for _ in range(amt_cores):
             job_queue.put("STOP")
 
-    def format_ensemble_results(self, ensemble_dictionary):
-        """
-        Function to handle all the steps of formatting the ensemble output again.
-
-        Input:
-            ensemble_dictionary: dictionary containing all the ensemble results
-        """
-
-        original_ensemble_results = ensemble_dictionary
-
-        float_format_ensemble_results = recursive_change_key_to_float(original_ensemble_results)
-        del original_ensemble_results
-        gc.collect()
-
-        # Then sort the dictionary
-        sorted_ensemble_results = custom_sort_dict(float_format_ensemble_results)
-        del float_format_ensemble_results
-        gc.collect()
-
-        # Then Change the keys back to a string but with a %g format.
-        reformatted_ensemble_results = recursive_change_key_to_string(sorted_ensemble_results)
-        del sorted_ensemble_results
-        gc.collect()
-
-        # Put back in the dictionary
-        return reformatted_ensemble_results
-
     def _evolve_population_grid(self):
         """
         Function that handles running the population using multiprocessing.
@@ -1049,7 +1023,7 @@ class Population:
                 break
 
         # Extra ensemble result manipulation:
-        combined_output_dict['ensemble_results']['ensemble'] = self.format_ensemble_results(combined_output_dict['ensemble_results'].get('ensemble', {}))
+        combined_output_dict['ensemble_results']['ensemble'] = format_ensemble_results(combined_output_dict['ensemble_results'].get('ensemble', {}))
         gc.collect()
 
         # Take into account that we run this on multiple cores
@@ -1421,10 +1395,11 @@ class Population:
                     ),
                 )
 
+                # TODO: consider writing this in a formatted structure
                 # Write to file
-                ensemble_output = extract_ensemble_json_from_string(ensemble_raw_output)
                 with open(output_file, "w") as f:
-                    f.write(json.dumps(self.format_ensemble_results(ensemble_output)))
+                    f.write(ensemble_raw_output)
+                    # f.write(json.dumps(self.format_ensemble_results(ensemble_output)))
 
                 print(
                     "Thread {}: Wrote ensemble results directly to file: {}".format(