diff --git a/binarycpython/tests/main.py b/binarycpython/tests/main.py
index 66fef0673d8b2972fb85fbe23811e729493bf418..5a00d810a0d58dc0a916d0efc53bb887e82e4b5b 100644
--- a/binarycpython/tests/main.py
+++ b/binarycpython/tests/main.py
@@ -11,6 +11,7 @@ from binarycpython.tests.test_plot_functions import *
 from binarycpython.tests.test_run_system_wrapper import *
 from binarycpython.tests.test_spacing_functions import *
 from binarycpython.tests.test_useful_funcs import *
+from binarycpython.tests.test_grid_options_defaults import *
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_c_bindings.py b/binarycpython/tests/test_c_bindings.py
index 5e9b9c3976a09f6157c9c4cd3029c2b96ae4310c..5d97ffc91da0897489cb12f470327a18f7a79d7f 100644
--- a/binarycpython/tests/test_c_bindings.py
+++ b/binarycpython/tests/test_c_bindings.py
@@ -61,12 +61,13 @@ ensemble_filters_off {8} ensemble_filter_{9} 1 probability 0.1"
 ### General run_system test
 #######################################################################################################################################################
 
+
 class test_run_system(unittest.TestCase):
     """
     Unit test for run_system
     """
 
-    def test_output(self):    
+    def test_output(self):
         m1 = 15.0  # Msun
         m2 = 14.0  # Msun
         separation = 0  # 0 = ignored, use period
@@ -86,12 +87,18 @@ class test_run_system(unittest.TestCase):
 
         output = _binary_c_bindings.run_system(argstring=argstring)
 
-        self.assertIn("SINGLE_STAR_LIFETIME", output, msg="Output didn't contain SINGLE_STAR_LIFETIME")
+        self.assertIn(
+            "SINGLE_STAR_LIFETIME",
+            output,
+            msg="Output didn't contain SINGLE_STAR_LIFETIME",
+        )
+
 
 #######################################################################################################################################################
 ### memaddr test
 #######################################################################################################################################################
 
+
 class test_return_store_memaddr(unittest.TestCase):
     """
     Unit test for return_store_memaddr
@@ -114,8 +121,8 @@ class test_return_store_memaddr(unittest.TestCase):
 ### ensemble tests
 #######################################################################################################################################################
 
-class TestEnsemble(unittest.TestCase):
 
+class TestEnsemble(unittest.TestCase):
     def test_minimal_ensemble_output(self):
         """
         Tase case to check if the ensemble output is correctly written to the buffer instead of printed
@@ -146,7 +153,10 @@ class TestEnsemble(unittest.TestCase):
         # print(test_json.keys())
         # print(test_json)
 
-        self.assertIsNotNone(test_json, msg="Ensemble output not correctly written passed to the buffer in _binary_c_bindings")
+        self.assertIsNotNone(
+            test_json,
+            msg="Ensemble output not correctly written passed to the buffer in _binary_c_bindings",
+        )
         self.assertIn("number_counts", test_json.keys())
 
     def test_return_persistent_data_memaddr(self):
@@ -161,8 +171,9 @@ class TestEnsemble(unittest.TestCase):
         print(textwrap.indent(str(output), "\t"))
 
         self.assertIsInstance(output, int, msg="memory adress has to be an integer")
-        self.assertNotEqual(output, 0, "memory adress seems not to have a correct value")
-
+        self.assertNotEqual(
+            output, 0, "memory adress seems not to have a correct value"
+        )
 
     def test_passing_persistent_data_to_run_system(self):
         # Function to test the passing of the persistent data memoery adress, and having ensemble_defer = True
@@ -186,7 +197,8 @@ class TestEnsemble(unittest.TestCase):
 
         # Doing 2 systems in a row.
         output_1_deferred = _binary_c_bindings.run_system(
-            argstring=argstring_1_deferred, persistent_data_memaddr=persistent_data_memaddr
+            argstring=argstring_1_deferred,
+            persistent_data_memaddr=persistent_data_memaddr,
         )
         output_2 = _binary_c_bindings.run_system(
             argstring=argstring_2, persistent_data_memaddr=persistent_data_memaddr
@@ -201,14 +213,24 @@ class TestEnsemble(unittest.TestCase):
         # Doing system one again.
         output_1_again = _binary_c_bindings.run_system(argstring=argstring_1)
         ensemble_jsons_1 = [
-            line for line in output_1_again.splitlines() if line.startswith("ENSEMBLE_JSON")
+            line
+            for line in output_1_again.splitlines()
+            if line.startswith("ENSEMBLE_JSON")
         ]
         json_1_again = handle_ensemble_string_to_json(
             ensemble_jsons_1[0][len("ENSEMBLE_JSON ") :]
         )
 
-        self.assertEqual(json_1, json_1_again, msg="The system with the same initial settings did not give the same output")
-        self.assertNotEqual(json_1, json_2, msg="The output of the deferred two systems should not be the same as the first undeferred output")
+        self.assertEqual(
+            json_1,
+            json_1_again,
+            msg="The system with the same initial settings did not give the same output",
+        )
+        self.assertNotEqual(
+            json_1,
+            json_2,
+            msg="The output of the deferred two systems should not be the same as the first undeferred output",
+        )
 
     def test_adding_ensemble_output(self):
         """
@@ -258,7 +280,9 @@ class TestEnsemble(unittest.TestCase):
             file.write(json.dumps(test_1_json_1, indent=4))
         with open(os.path.join(TMP_DIR, "test", "adding_json_2.json"), "w") as file:
             file.write(json.dumps(test_1_json_2, indent=4))
-        with open(os.path.join(TMP_DIR, "test", "adding_json_merged.json"), "w") as file:
+        with open(
+            os.path.join(TMP_DIR, "test", "adding_json_merged.json"), "w"
+        ) as file:
             file.write(json.dumps(test_1_json_2, indent=4))
 
         print("Single runs done\n")
@@ -280,7 +304,9 @@ class TestEnsemble(unittest.TestCase):
         )
 
         # Get a memory location
-        test_2_persistent_data_memaddr = _binary_c_bindings.return_persistent_data_memaddr()
+        test_2_persistent_data_memaddr = (
+            _binary_c_bindings.return_persistent_data_memaddr()
+        )
 
         # Run the systems and defer the output each time
         _ = _binary_c_bindings.run_system(
@@ -299,13 +325,17 @@ class TestEnsemble(unittest.TestCase):
             )
         )
         test_2_ensemble_json = [
-            line for line in test_2_output.splitlines() if line.startswith("ENSEMBLE_JSON")
+            line
+            for line in test_2_output.splitlines()
+            if line.startswith("ENSEMBLE_JSON")
         ]
         test_2_json = handle_ensemble_string_to_json(
             test_2_ensemble_json[0][len("ENSEMBLE_JSON ") :]
         )
 
-        with open(os.path.join(TMP_DIR, "test", "adding_json_deferred.json"), "w") as file:
+        with open(
+            os.path.join(TMP_DIR, "test", "adding_json_deferred.json"), "w"
+        ) as file:
             file.write(json.dumps(test_2_json, indent=4))
 
         print("Double deferred done\n")
@@ -315,7 +345,9 @@ class TestEnsemble(unittest.TestCase):
         # Then the second one uses that memory to combine its results with, but doesn't defer the
         # data after that, so it will print it after the second run is done
 
-        test_3_persistent_data_memaddr = _binary_c_bindings.return_persistent_data_memaddr()
+        test_3_persistent_data_memaddr = (
+            _binary_c_bindings.return_persistent_data_memaddr()
+        )
 
         # Run the systems and defer the output once and the second time not, so that the second run
         # automatically prints out the results
@@ -324,7 +356,8 @@ class TestEnsemble(unittest.TestCase):
             persistent_data_memaddr=test_3_persistent_data_memaddr,
         )
         test_3_output_2 = _binary_c_bindings.run_system(
-            argstring=argstring_2, persistent_data_memaddr=test_3_persistent_data_memaddr
+            argstring=argstring_2,
+            persistent_data_memaddr=test_3_persistent_data_memaddr,
         )
         test_3_ensemble_jsons = [
             line
@@ -357,10 +390,13 @@ class TestEnsemble(unittest.TestCase):
 
         # TODO: add more asserts.
         #
-        self.assertEqual(inspect_dict(test_1_merged_dict, print_structure=False), inspect_dict(test_2_json, print_structure=False), msg=assert_message_1)
+        self.assertEqual(
+            inspect_dict(test_1_merged_dict, print_structure=False),
+            inspect_dict(test_2_json, print_structure=False),
+            msg=assert_message_1,
+        )
         # assert inspect_dict(test_1_merged_dict, print_structure=False) == inspect_dict(test_3_json, print_structure=False), assert_message_2
 
-
     def test_free_and_json_output(self):
         """
         Function that tests the freeing of the memory adress and the output of the json
@@ -394,7 +430,11 @@ class TestEnsemble(unittest.TestCase):
             json_output_by_freeing.splitlines()[0][len("ENSEMBLE_JSON ") :],
         )
 
-        self.assertIn("number_counts", parsed_json.keys(), msg="Output not correct. 'number_counts' not part of the keys")
+        self.assertIn(
+            "number_counts",
+            parsed_json.keys(),
+            msg="Output not correct. 'number_counts' not part of the keys",
+        )
 
     def test_combine_with_empty_json(self):
         """
@@ -410,9 +450,7 @@ class TestEnsemble(unittest.TestCase):
             ensemble_jsons_1[0][len("ENSEMBLE_JSON ") :]
         )
 
-        assert_message = (
-            "combining output json with empty dict should give same result as initial json"
-        )
+        assert_message = "combining output json with empty dict should give same result as initial json"
 
         self.assertEqual(merge_dicts(json_1, {}), json_1, assert_message)
 
@@ -420,7 +458,7 @@ class TestEnsemble(unittest.TestCase):
     def _test_full_ensemble_output(self):
         """
         Function to just output the whole ensemble
-        TODO: put this one back 
+        TODO: put this one back
         """
 
         argstring_1 = return_argstring(defer_ensemble=0, ensemble_filters_off=0)
@@ -434,7 +472,6 @@ class TestEnsemble(unittest.TestCase):
             ensemble_jsons_1[0][len("ENSEMBLE_JSON ") :]
         )
 
-        
         keys = json_1.keys()
 
         # assert statements:
@@ -471,5 +508,5 @@ def all():
 #     all()
 #     print("Done")
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_custom_logging.py b/binarycpython/tests/test_custom_logging.py
index e3ad9c1464eacf0143e168b778a2d2375792d027..a6159732764d519dffadf966273e9c9e2117fbf0 100644
--- a/binarycpython/tests/test_custom_logging.py
+++ b/binarycpython/tests/test_custom_logging.py
@@ -4,6 +4,7 @@ from binarycpython.utils.custom_logging_functions import *
 
 binary_c_temp_dir = temp_dir()
 
+
 class test_custom_logging(unittest.TestCase):
     """
     Unit test for the custom_logging module
@@ -12,39 +13,62 @@ class test_custom_logging(unittest.TestCase):
     def test_autogen_C_logging_code(self):
 
         input_dict_1 = None
-        output_1 = autogen_C_logging_code(input_dict_1)
+        output_1 = autogen_C_logging_code(input_dict_1, verbose=1)
         self.assertEqual(output_1, None, msg="Error. return value should be None")
 
-        input_dict_2 = {'MY_STELLAR_DATA': ['model.time','star[0].mass', 'model.probability', 'model.dt']}
-        output_2 = autogen_C_logging_code(input_dict_2)
+        input_dict_2 = {
+            "MY_STELLAR_DATA": [
+                "model.time",
+                "star[0].mass",
+                "model.probability",
+                "model.dt",
+            ]
+        }
+        output_2 = autogen_C_logging_code(input_dict_2, verbose=1)
 
         test_output_2 = 'Printf("MY_STELLAR_DATA %g %g %g %g\\n",((double)stardata->model.time),((double)stardata->star[0].mass),((double)stardata->model.probability),((double)stardata->model.dt));'
-        self.assertEqual(output_2, test_output_2, msg="Output doesnt match the test_output_2")
+        self.assertEqual(
+            output_2, test_output_2, msg="Output doesnt match the test_output_2"
+        )
 
-        input_dict_3 = {'MY_STELLAR_DATA': 2}
-        output_3 = autogen_C_logging_code(input_dict_3)
+        input_dict_3 = {"MY_STELLAR_DATA": 2}
+        output_3 = autogen_C_logging_code(input_dict_3, verbose=1)
         self.assertEqual(output_3, None, msg="Output should be None")
 
     def test_binary_c_log_code(self):
         input_1 = "None"
-        output_1 = binary_c_log_code(input_1)
+        output_1 = binary_c_log_code(input_1, verbose=1)
         self.assertEqual(output_1, None, msg="Output should be None")
 
         input_2 = 'Printf("MY_STELLAR_DATA %g %g %g %g\\n",((double)stardata->model.time),((double)stardata->star[0].mass),((double)stardata->model.probability),((double)stardata->model.dt));'
-        output_2 = binary_c_log_code(input_2)
+        output_2 = binary_c_log_code(input_2, verbose=1)
         test_value_2 = '#pragma push_macro("MAX")\n#pragma push_macro("MIN")\n#undef MAX\n#undef MIN\n#include "binary_c.h"\n#include "RLOF/RLOF_prototypes.h"\n\n// add visibility __attribute__ ((visibility ("default"))) to it \nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata);\nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata)\n{\n    // struct stardata_t * stardata = (struct stardata_t *)x;\n    Printf("MY_STELLAR_DATA %g %g %g %g\\n",((double)stardata->model.time),((double)stardata->star[0].mass),((double)stardata->model.probability),((double)stardata->model.dt));;\n}\n\n#undef MAX \n#undef MIN\n#pragma pop_macro("MIN")\n#pragma pop_macro("MAX")    '
-        self.assertEqual(output_2, test_value_2, msg="Output does not match what it should be: {}".format(test_value_2))
+        self.assertEqual(
+            output_2,
+            test_value_2,
+            msg="Output does not match what it should be: {}".format(test_value_2),
+        )
 
     def test_binary_c_write_log_code(self):
         input_1 = '#pragma push_macro("MAX")\n#pragma push_macro("MIN")\n#undef MAX\n#undef MIN\n#include "binary_c.h"\n#include "RLOF/RLOF_prototypes.h"\n\n// add visibility __attribute__ ((visibility ("default"))) to it \nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata);\nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata)\n{\n    // struct stardata_t * stardata = (struct stardata_t *)x;\n    Printf("MY_STELLAR_DATA %g %g %g %g\\n",((double)stardata->model.time),((double)stardata->star[0].mass),((double)stardata->model.probability),((double)stardata->model.dt));;\n}\n\n#undef MAX \n#undef MIN\n#pragma pop_macro("MIN")\n#pragma pop_macro("MAX")    '
-        binary_c_write_log_code(input_1, os.path.join(binary_c_temp_dir, 'test_binary_c_write_log_code.txt'))
-
-        self.assertTrue(os.path.isfile(os.path.join(binary_c_temp_dir, 'test_binary_c_write_log_code.txt')), msg="File not created")
-        with open(os.path.join(binary_c_temp_dir, 'test_binary_c_write_log_code.txt')) as f:
+        binary_c_write_log_code(
+            input_1,
+            os.path.join(binary_c_temp_dir, "test_binary_c_write_log_code.txt"),
+            verbose=1,
+        )
+
+        self.assertTrue(
+            os.path.isfile(
+                os.path.join(binary_c_temp_dir, "test_binary_c_write_log_code.txt")
+            ),
+            msg="File not created",
+        )
+        with open(
+            os.path.join(binary_c_temp_dir, "test_binary_c_write_log_code.txt")
+        ) as f:
             content_file = repr(f.read())
         self.assertEqual(repr(input_1), content_file, msg="Contents are not similar")
 
-
     def test_from_binary_c_config(self):
         # not going to test everything here, just the version and any output at all
 
@@ -52,11 +76,14 @@ class test_custom_logging(unittest.TestCase):
         if BINARY_C_DIR:
             BINARY_C_CONFIG = os.path.join(BINARY_C_DIR, "binary_c-config")
 
-        self.assertTrue(os.path.isfile(BINARY_C_CONFIG), msg="{} doesn't exist".format(BINARY_C_CONFIG))
+        self.assertTrue(
+            os.path.isfile(BINARY_C_CONFIG),
+            msg="{} doesn't exist".format(BINARY_C_CONFIG),
+        )
 
-        input_1 = 'aa'
+        input_1 = "aa"
         output_1 = from_binary_c_config(BINARY_C_CONFIG, input_1)
-        self.assertTrue(output_1.startswith('Usage'))
+        self.assertTrue(output_1.startswith("Usage"))
 
         input_2 = "version"
         output_2 = from_binary_c_config(BINARY_C_CONFIG, input_2)
@@ -66,7 +93,7 @@ class test_custom_logging(unittest.TestCase):
         # Just going to check whether the dictionary has the components it needs
         # TODO: check whether we need to make this better
 
-        output = return_compilation_dict(verbose=-1)
+        output = return_compilation_dict(verbose=1)
 
         self.assertTrue("cc" in output)
         self.assertTrue("ld" in output)
@@ -75,13 +102,17 @@ class test_custom_logging(unittest.TestCase):
         self.assertTrue("inc" in output)
 
     def test_create_and_load_logging_function(self):
-        # 
+        #
         input_1 = '#pragma push_macro("MAX")\n#pragma push_macro("MIN")\n#undef MAX\n#undef MIN\n#include "binary_c.h"\n#include "RLOF/RLOF_prototypes.h"\n\n// add visibility __attribute__ ((visibility ("default"))) to it \nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata);\nvoid binary_c_API_function custom_output_function(struct stardata_t * stardata)\n{\n    // struct stardata_t * stardata = (struct stardata_t *)x;\n    Printf("MY_STELLAR_DATA %g %g %g %g\\n",((double)stardata->model.time),((double)stardata->star[0].mass),((double)stardata->model.probability),((double)stardata->model.dt));;\n}\n\n#undef MAX \n#undef MIN\n#pragma pop_macro("MIN")\n#pragma pop_macro("MAX")    '
-        output_1 = create_and_load_logging_function(input_1, verbose=-1)
+        output_1 = create_and_load_logging_function(input_1, verbose=1)
+
+        self.assertTrue(isinstance(output_1[0], int), msg="memaddr is not an int")
+        self.assertTrue(output_1[0] > 0, msg="memaddr is an int but not set correctly")
+        self.assertTrue(
+            "libcustom_logging" in output_1[1],
+            msg="Name of the libcustom_logging not correct",
+        )
 
-        self.assertTrue(isinstance(output_1[0], int), msg='memaddr is not an int')
-        self.assertTrue(output_1[0] > 0, msg='memaddr is an int but not set correctly')
-        self.assertTrue('libcustom_logging' in output_1[1], msg='Name of the libcustom_logging not correct')
 
-if __name__=="__main__":
+if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_distributions.py b/binarycpython/tests/test_distributions.py
index 4d54820a8067aed2620b020e6f2efd3ed8c2d28b..bcb038cdf3595dd30e9c71fedbea8c4c18f9d383 100644
--- a/binarycpython/tests/test_distributions.py
+++ b/binarycpython/tests/test_distributions.py
@@ -6,6 +6,7 @@ import unittest
 from binarycpython.utils.distribution_functions import *
 from binarycpython.utils.useful_funcs import calc_sep_from_period
 
+
 class TestDistributions(unittest.TestCase):
     """
     Unittest class
@@ -20,7 +21,7 @@ class TestDistributions(unittest.TestCase):
         self.mass_list = [0.1, 0.2, 1, 10, 15, 50]
         self.logper_list = [-2, -0.5, 1.6, 2.5, 5.3, 10]
         self.q_list = [0.01, 0.2, 0.4, 0.652, 0.823, 1]
-        self.per_list = [10**logper for logper in self.logper_list]
+        self.per_list = [10 ** logper for logper in self.logper_list]
 
         self.tolerance = 1e-5
 
@@ -29,7 +30,14 @@ class TestDistributions(unittest.TestCase):
         unittest for the powerlaw test
         """
 
-        perl_results = [0, 0, 1.30327367546194, 0.00653184128064016, 0.00257054805572128, 0.000161214690242696]
+        perl_results = [
+            0,
+            0,
+            1.30327367546194,
+            0.00653184128064016,
+            0.00257054805572128,
+            0.000161214690242696,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -37,29 +45,45 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_three_part_power_law(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [10.0001044752901, 2.03065220596677, 0.0501192469795434, 0.000251191267451594, 9.88540897458207e-05, 6.19974072148769e-06]
+        perl_results = [
+            10.0001044752901,
+            2.03065220596677,
+            0.0501192469795434,
+            0.000251191267451594,
+            9.88540897458207e-05,
+            6.19974072148769e-06,
+        ]
         python_results = []
 
         for mass in self.mass_list:
-            python_results.append(three_part_powerlaw (mass, 0.08, 0.1, 1, 300, -1.3, -2.3, -2.3))
+            python_results.append(
+                three_part_powerlaw(mass, 0.08, 0.1, 1, 300, -1.3, -2.3, -2.3)
+            )
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_Kroupa2001(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [5.71196495365248, 2.31977861075353, 0.143138195684851, 0.000717390363216896, 0.000282322598503135, 1.77061658757533e-05]
+        perl_results = [
+            5.71196495365248,
+            2.31977861075353,
+            0.143138195684851,
+            0.000717390363216896,
+            0.000282322598503135,
+            1.77061658757533e-05,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -67,14 +91,21 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_ktg93(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [5.79767807698379, 2.35458895566605, 0.155713799148675, 0.000310689875361984, 0.000103963454405194, 4.02817276824841e-06]
+        perl_results = [
+            5.79767807698379,
+            2.35458895566605,
+            0.155713799148675,
+            0.000310689875361984,
+            0.000103963454405194,
+            4.02817276824841e-06,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -82,15 +113,21 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
-
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_gaussian(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [0.00218800520299544, 0.0121641269671571, 0.0657353455837751, 0.104951743573429, 0.16899534495487, 0.0134332780385336]
+        perl_results = [
+            0.00218800520299544,
+            0.0121641269671571,
+            0.0657353455837751,
+            0.104951743573429,
+            0.16899534495487,
+            0.0134332780385336,
+        ]
         python_results = []
 
         for logper in self.logper_list:
@@ -98,15 +135,21 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
-
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_Arenou2010_binary_fraction(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [0.123079723518677, 0.178895136157746, 0.541178340047153, 0.838798485820276, 0.838799998443204, 0.8388]
+        perl_results = [
+            0.123079723518677,
+            0.178895136157746,
+            0.541178340047153,
+            0.838798485820276,
+            0.838799998443204,
+            0.8388,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -114,7 +157,7 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_raghavan2010_binary_fraction(self):
         """
@@ -129,14 +172,51 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_Izzard2012_period_distribution(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [0, 0.00941322840619318, 0.0575068231479569, 0.0963349886047932, 0.177058537292581, 0.0165713385659234, 0, 0.00941322840619318, 0.0575068231479569, 0.0963349886047932, 0.177058537292581, 0.0165713385659234, 0, 0.00941322840619318, 0.0575068231479569, 0.0963349886047932, 0.177058537292581, 0.0165713385659234, 0, 7.61631504133159e-09, 0.168028727846997, 0.130936282216512, 0.0559170865520968, 0.0100358604460285, 0, 2.08432736869149e-21, 0.18713622563288, 0.143151383185002, 0.0676299576972089, 0.0192427864870784, 0, 1.1130335685003e-24, 0.194272603987661, 0.14771508552257, 0.0713078479280884, 0.0221093965810181]
+        perl_results = [
+            0,
+            0.00941322840619318,
+            0.0575068231479569,
+            0.0963349886047932,
+            0.177058537292581,
+            0.0165713385659234,
+            0,
+            0.00941322840619318,
+            0.0575068231479569,
+            0.0963349886047932,
+            0.177058537292581,
+            0.0165713385659234,
+            0,
+            0.00941322840619318,
+            0.0575068231479569,
+            0.0963349886047932,
+            0.177058537292581,
+            0.0165713385659234,
+            0,
+            7.61631504133159e-09,
+            0.168028727846997,
+            0.130936282216512,
+            0.0559170865520968,
+            0.0100358604460285,
+            0,
+            2.08432736869149e-21,
+            0.18713622563288,
+            0.143151383185002,
+            0.0676299576972089,
+            0.0192427864870784,
+            0,
+            1.1130335685003e-24,
+            0.194272603987661,
+            0.14771508552257,
+            0.0713078479280884,
+            0.0221093965810181,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -145,30 +225,255 @@ class TestDistributions(unittest.TestCase):
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_flatsections(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [1.01010101010101, 1.01010101010101, 1.01010101010101, 1.01010101010101, 1.01010101010101, 1.01010101010101]
+        perl_results = [
+            1.01010101010101,
+            1.01010101010101,
+            1.01010101010101,
+            1.01010101010101,
+            1.01010101010101,
+            1.01010101010101,
+        ]
         python_results = []
 
         for q in self.q_list:
-            python_results.append(flatsections(q, [{'min': 0.01, 'max': 1.0, 'height': 1.0}]))
+            python_results.append(
+                flatsections(q, [{"min": 0.01, "max": 1.0, "height": 1.0}])
+            )
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
-
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
 
     def test_sana12(self):
         """
         unittest for three_part_power_law
         """
 
-        perl_results = [0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.121764808010258, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805, 0.481676471294883, 0.481676471294883, 0.131020615300798, 0.102503482445846, 0.0678037785559114, 0.066436408359805]
+        perl_results = [
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.121764808010258,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+            0.481676471294883,
+            0.481676471294883,
+            0.131020615300798,
+            0.102503482445846,
+            0.0678037785559114,
+            0.066436408359805,
+        ]
         python_results = []
 
         for mass in self.mass_list:
@@ -177,13 +482,18 @@ class TestDistributions(unittest.TestCase):
                     mass_2 = mass * q
 
                     sep = calc_sep_from_period(mass, mass_2, per)
-                    sep_min = calc_sep_from_period(mass, mass_2, 10**0.15)
-                    sep_max = calc_sep_from_period(mass, mass_2, 10**5.5)
-                    python_results.append(sana12(mass, mass_2, sep, per, sep_min, sep_max, 0.15, 5.5, -0.55))
+                    sep_min = calc_sep_from_period(mass, mass_2, 10 ** 0.15)
+                    sep_max = calc_sep_from_period(mass, mass_2, 10 ** 5.5)
+                    python_results.append(
+                        sana12(
+                            mass, mass_2, sep, per, sep_min, sep_max, 0.15, 5.5, -0.55
+                        )
+                    )
 
         # GO over the results and check whether they are equal (within tolerance)
         for i in range(len(python_results)):
-            self.assertLess(np.abs(python_results[i]-perl_results[i]), self.tolerance)
+            self.assertLess(np.abs(python_results[i] - perl_results[i]), self.tolerance)
+
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_functions.py b/binarycpython/tests/test_functions.py
index 32fd7747942a94ec2c46b1dc157764ef4229d5ff..b83c2062156bde44a4d7872beef2b9c6a561cb92 100644
--- a/binarycpython/tests/test_functions.py
+++ b/binarycpython/tests/test_functions.py
@@ -26,6 +26,7 @@ class test_get_help_super(unittest.TestCase):
         self.assertIn("algorithms", get_help_super_keys, "missing section")
         self.assertIn("misc", get_help_super_keys, "missing section")
 
+
 class test_get_help_all(unittest.TestCase):
     """
     Unit test for get_help_all
@@ -39,7 +40,6 @@ class test_get_help_all(unittest.TestCase):
         get_help_all_output = get_help_all(print_help=False)
         get_help_all_keys = get_help_all_output.keys()
 
-
         self.assertIn("stars", get_help_all_keys, "missing section")
         self.assertIn("binary", get_help_all_keys, "missing section")
         self.assertIn("nucsyn", get_help_all_keys, "missing section")
@@ -55,25 +55,11 @@ class test_get_help(unittest.TestCase):
         Function to test the get_help function
         """
 
-        self.assertEqual(get_help("M_1", print_help=False)["parameter_name"], "M_1", msg="get_help('M_1') should return the correct parameter name")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+        self.assertEqual(
+            get_help("M_1", print_help=False)["parameter_name"],
+            "M_1",
+            msg="get_help('M_1') should return the correct parameter name",
+        )
 
 
 def all():
@@ -82,5 +68,5 @@ def all():
     test_get_help_super()
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
diff --git a/binarycpython/tests/test_grid_options_defaults.py b/binarycpython/tests/test_grid_options_defaults.py
new file mode 100644
index 0000000000000000000000000000000000000000..c4fe4740080b90cb4f1756eaaafebeb39a1d69da
--- /dev/null
+++ b/binarycpython/tests/test_grid_options_defaults.py
@@ -0,0 +1,40 @@
+import unittest
+
+from binarycpython.utils.grid_options_defaults import *
+
+binary_c_temp_dir = temp_dir()
+
+
+class test_grid_options_defaults(unittest.TestCase):
+    """
+    Unit test for the custom_logging module
+    """
+
+    def test_grid_options_help(self):
+        input_1 = "aa"
+        result_1 = grid_options_help(input_1)
+        self.assertEqual(result_1, {}, msg="Dict should be empty")
+
+        input_2 = "amt_cores"
+        result_2 = grid_options_help(input_2)
+        self.assertIn(
+            input_2,
+            result_2,
+            msg="{} should be in the keys of the returned dict".format(input_2),
+        )
+        self.assertNotEqual(
+            result_2[input_2], "", msg="description should not be empty"
+        )
+
+        input_3 = "condor_jobid"
+        result_3 = grid_options_help(input_3)
+        self.assertIn(
+            input_3,
+            result_3,
+            msg="{} should be in the keys of the returned dict".format(input_3),
+        )
+        self.assertEqual(result_3[input_3], "", msg="description should be empty")
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/binarycpython/tests/test_run_system_wrapper.py b/binarycpython/tests/test_run_system_wrapper.py
index dd3c1560904626324e04b78f359646173bdd240e..098968360c11ca75ef682883bd6307621fc9693e 100644
--- a/binarycpython/tests/test_run_system_wrapper.py
+++ b/binarycpython/tests/test_run_system_wrapper.py
@@ -1 +1 @@
-from binarycpython.utils.run_system_wrapper import * 
\ No newline at end of file
+from binarycpython.utils.run_system_wrapper import *
diff --git a/binarycpython/tests/test_spacing_functions.py b/binarycpython/tests/test_spacing_functions.py
index c7fc6f688638a1c59584ee040a007645b2ee5ed9..2826ae298437d012bf66a074951032008c4a8a1c 100644
--- a/binarycpython/tests/test_spacing_functions.py
+++ b/binarycpython/tests/test_spacing_functions.py
@@ -2,6 +2,7 @@ import unittest
 import numpy as np
 from binarycpython.utils.spacing_functions import *
 
+
 class test_spacing_functions(unittest.TestCase):
     """
     Unit test for spacing functions
@@ -9,4 +10,8 @@ class test_spacing_functions(unittest.TestCase):
 
     def test_const(self):
         const_return = const(1, 10, 10)
-        self.assertEqual(const_return, np.linespace(1, 10, 10), msg="Output didn't contain SINGLE_STAR_LIFETIME")
+        self.assertEqual(
+            const_return,
+            np.linespace(1, 10, 10),
+            msg="Output didn't contain SINGLE_STAR_LIFETIME",
+        )
diff --git a/binarycpython/utils/custom_logging_functions.py b/binarycpython/utils/custom_logging_functions.py
index 8fb3b0fdcb55b4d9693833c29e289bb8f3a7558d..aaaa63371377c4a64e6f1731ecc91b2eff126a11 100644
--- a/binarycpython/utils/custom_logging_functions.py
+++ b/binarycpython/utils/custom_logging_functions.py
@@ -12,7 +12,8 @@ import uuid
 from typing import Union, Tuple, Optional
 from binarycpython.utils.functions import temp_dir, remove_file, verbose_print
 
-def autogen_C_logging_code(logging_dict: dict, verbose: int=0) -> Optional[str]:
+
+def autogen_C_logging_code(logging_dict: dict, verbose: int = 0) -> Optional[str]:
     """
     Function that autogenerates PRINTF statements for binaryc.
     Input is a dictionary where the key is the header of that logging line
@@ -31,7 +32,7 @@ def autogen_C_logging_code(logging_dict: dict, verbose: int=0) -> Optional[str]:
             }
 
     Args:
-        logging_dict: Dictionary containing lists of parameters that binary_c has to output. The keys are used by binary_c as start of the sentence. 
+        logging_dict: Dictionary containing lists of parameters that binary_c has to output. The keys are used by binary_c as start of the sentence.
         verbose: Level of verbosity. Defaults to zero if not set explicilty.
 
     Returns:
@@ -80,10 +81,10 @@ def autogen_C_logging_code(logging_dict: dict, verbose: int=0) -> Optional[str]:
 
 
 ####################################################################################
-def binary_c_log_code(code: str, verbose: int=0) -> str:
+def binary_c_log_code(code: str, verbose: int = 0) -> str:
     """
     Function to construct the code to construct the custom logging function
-    
+
     Example:
         Code to log and terminate evolution when the primary star becomes a NS::
 
@@ -92,7 +93,7 @@ def binary_c_log_code(code: str, verbose: int=0) -> str:
                 if (stardata->model.time < stardata->model.max_evolution_time)
                 {
                     Printf("EXAMPLE_LOG_CO %30.12e %g %g %g %g %d %d\\n",
-                        // 
+                        //
                         stardata->model.time, // 1
 
                         stardata->star[0].mass, //2
@@ -110,17 +111,21 @@ def binary_c_log_code(code: str, verbose: int=0) -> str:
             };
 
     Args:
-        code: Exact c-statement to output information in binary_c. Can be wrapped in logical statements. 
+        code: Exact c-statement to output information in binary_c. Can be wrapped in logical statements.
         verbose: Level of verbosity. Defaults to zero if not set explicilty.
 
     Returns:
         string containing the custom logging code. This includes all the includes and other definitions. This code will be used as the shared library
     """
 
-    verbose_print("Creating the code for the shared library for the custom logging", verbose, 0)
+    verbose_print(
+        "Creating the code for the shared library for the custom logging", verbose, 0
+    )
 
     if not "Printf" in code:
-        print("Error: There has to be at least a printf statement in the provided code. Aborting")
+        print(
+            "Error: There has to be at least a printf statement in the provided code. Aborting"
+        )
         return None
 
     # Create code
@@ -152,13 +157,13 @@ void binary_c_API_function custom_output_function(struct stardata_t * stardata)
     return textwrap.dedent(custom_logging_function_string)
 
 
-def binary_c_write_log_code(code: str, filename: str, verbose: int=0) -> None:
+def binary_c_write_log_code(code: str, filename: str, verbose: int = 0) -> None:
     """
     Function to write the generated logging code to a file
 
     Args:
-        code: string containing the custom logging code to write to a file. 
-        filename: target filename. 
+        code: string containing the custom logging code to write to a file.
+        filename: target filename.
         verbose: Level of verbosity. Defaults to zero if not set explicilty.
     """
 
@@ -183,7 +188,7 @@ def from_binary_c_config(config_file: str, flag: str) -> str:
 
     Args:
         config_file: binary_c-config filepath TODO: change the name of this
-        flag: flag used in the binary_c-config call. 
+        flag: flag used in the binary_c-config call.
 
     Returns:
         returns the result of <binary_c-config> <flag>
@@ -201,7 +206,7 @@ def from_binary_c_config(config_file: str, flag: str) -> str:
     return res
 
 
-def return_compilation_dict(verbose: int=0) -> dict:
+def return_compilation_dict(verbose: int = 0) -> dict:
     """
     Function to build the compile command for the shared library
 
@@ -299,7 +304,9 @@ def return_compilation_dict(verbose: int=0) -> dict:
     return {"cc": cc, "ld": ld, "ccflags": ccflags, "libs": libs, "inc": inc}
 
 
-def compile_shared_lib(code: str, sourcefile_name: str, outfile_name: str, verbose: int=0) -> None:
+def compile_shared_lib(
+    code: str, sourcefile_name: str, outfile_name: str, verbose: int = 0
+) -> None:
     """
     Function to write the custom logging code to a file and then compile it.
 
@@ -356,12 +363,14 @@ def compile_shared_lib(code: str, sourcefile_name: str, outfile_name: str, verbo
             print("Output of compilation command:\n{}".format(res))
 
 
-def create_and_load_logging_function(custom_logging_code: str, verbose: int=0) -> Tuple[int, str]:
+def create_and_load_logging_function(
+    custom_logging_code: str, verbose: int = 0
+) -> Tuple[int, str]:
     """
     Function to automatically compile the shared library with the given
     custom logging code and load it with ctypes.
 
-    This function is more or less the main function of this module and unless you know what you're doing with the other functions 
+    This function is more or less the main function of this module and unless you know what you're doing with the other functions
     I recommend using this in function in combination with a function that generates the exact code (like :meth:`~binarycpython.utils.custom_logging_code.binary_c_log_code`)
 
     Args:
@@ -404,7 +413,11 @@ def create_and_load_logging_function(custom_logging_code: str, verbose: int=0) -
     ).value
 
     if not isinstance(func_memaddr, int):
-        print("Something went wrong. The memory adress returned by the ctypes.cast is not an integer. It has the value {}".format(func_memaddr))
+        print(
+            "Something went wrong. The memory adress returned by the ctypes.cast is not an integer. It has the value {}".format(
+                func_memaddr
+            )
+        )
         raise ValueError
 
     if verbose > 0:
diff --git a/binarycpython/utils/distribution_functions.py b/binarycpython/utils/distribution_functions.py
index bb95f7168b6a7622524b8c54065c0d0925882d79..b9476e04567144dcce331cf4c1976ea450d667b2 100644
--- a/binarycpython/utils/distribution_functions.py
+++ b/binarycpython/utils/distribution_functions.py
@@ -79,7 +79,7 @@ def flat() -> float:
     Dummy distribution function that returns 1
 
     Returns:
-        a flat uniform distribution: 1    
+        a flat uniform distribution: 1
     """
 
     return 1.0
@@ -88,25 +88,27 @@ def flat() -> float:
 def number(value: Union[int, float]) -> Union[int, float]:
     """
     Dummy distribution function that returns the input
-    
+
     Args:
         value: the value that will be returned by this function.
 
-    Returns: 
+    Returns:
         the value that was provided
     """
 
     return value
 
 
-def const(min_bound: Union[int, float], max_bound: Union[int, float], val: float=None) -> Union[int, float]:
+def const(
+    min_bound: Union[int, float], max_bound: Union[int, float], val: float = None
+) -> Union[int, float]:
     """
     a constant distribution function between min=min_bound and max=max_bound.
 
     Args:
         min_bound: lower bound of the range
         max_bound: upper bound of the range
-    
+
     Returns:
             returns the value of 1/(max_bound-min_bound). If val is provided, it will check whether min_bound < val <= max_bound. if not: returns 0
     """
@@ -120,12 +122,14 @@ def const(min_bound: Union[int, float], max_bound: Union[int, float], val: float
     return prob
 
 
-def powerlaw_constant(min_val: Union[int, float], max_val: Union[int, float], k: Union[int, float]) -> Union[int, float]:
+def powerlaw_constant(
+    min_val: Union[int, float], max_val: Union[int, float], k: Union[int, float]
+) -> Union[int, float]:
     """
     Function that returns the constant to normalise a powerlaw
-    
+
     TODO: what if k is -1?
-        
+
     Args:
         min_val: lower bound of the range
         max_val: upper bound of the range
@@ -146,7 +150,12 @@ def powerlaw_constant(min_val: Union[int, float], max_val: Union[int, float], k:
     return powerlaw_const
 
 
-def powerlaw(min_val: Union[int, float], max_val: Union[int, float], k: Union[int, float], x: Union[int, float]) -> Union[int, float]:
+def powerlaw(
+    min_val: Union[int, float],
+    max_val: Union[int, float],
+    k: Union[int, float],
+    x: Union[int, float],
+) -> Union[int, float]:
     """
     Single powerlaw with index k at x from min to max
 
@@ -181,7 +190,15 @@ def powerlaw(min_val: Union[int, float], max_val: Union[int, float], k: Union[in
     return prob
 
 
-def calculate_constants_three_part_powerlaw(m0: Union[int, float], m1: Union[int, float], m2: Union[int, float], m_max: Union[int, float], p1: Union[int, float], p2: Union[int, float], p3: Union[int, float]) -> Union[int, float]:
+def calculate_constants_three_part_powerlaw(
+    m0: Union[int, float],
+    m1: Union[int, float],
+    m2: Union[int, float],
+    m_max: Union[int, float],
+    p1: Union[int, float],
+    p2: Union[int, float],
+    p3: Union[int, float],
+) -> Union[int, float]:
     """
     Function to calculate the constants for a three-part powerlaw
 
@@ -245,7 +262,16 @@ def calculate_constants_three_part_powerlaw(m0: Union[int, float], m1: Union[int
     # $threepart_powerlaw_consts{"@_"}=[@$array];
 
 
-def three_part_powerlaw(m: Union[int, float], m0: Union[int, float], m1: Union[int, float], m2: Union[int, float], m_max: Union[int, float], p1: Union[int, float], p2: Union[int, float], p3: Union[int, float]) -> Union[int, float]:
+def three_part_powerlaw(
+    m: Union[int, float],
+    m0: Union[int, float],
+    m1: Union[int, float],
+    m2: Union[int, float],
+    m_max: Union[int, float],
+    p1: Union[int, float],
+    p2: Union[int, float],
+    p3: Union[int, float],
+) -> Union[int, float]:
     """
     Generalized three-part power law, usually used for mass distributions
 
@@ -284,7 +310,12 @@ def three_part_powerlaw(m: Union[int, float], m0: Union[int, float], m1: Union[i
     return prob
 
 
-def gaussian_normalizing_const(mean: Union[int, float], sigma: Union[int, float], gmin: Union[int, float], gmax: Union[int, float]) -> Union[int, float]:
+def gaussian_normalizing_const(
+    mean: Union[int, float],
+    sigma: Union[int, float],
+    gmin: Union[int, float],
+    gmax: Union[int, float],
+) -> Union[int, float]:
     """
     Function to calculate the normalisation constant for the gaussian
 
@@ -311,9 +342,11 @@ def gaussian_normalizing_const(mean: Union[int, float], sigma: Union[int, float]
     return ptot
 
 
-def gaussian_func(x: Union[int, float], mean: Union[int, float], sigma: Union[int, float]) -> Union[int, float]:
+def gaussian_func(
+    x: Union[int, float], mean: Union[int, float], sigma: Union[int, float]
+) -> Union[int, float]:
     """
-    Function to evaluate a gaussian at a given point, but this time without any boundaries. 
+    Function to evaluate a gaussian at a given point, but this time without any boundaries.
 
     Args:
         x: location at which to evaluate the distribution
@@ -330,7 +363,13 @@ def gaussian_func(x: Union[int, float], mean: Union[int, float], sigma: Union[in
     return gaussian_prefactor * r * math.exp(-0.5 * y ** 2)
 
 
-def gaussian(x: Union[int, float], mean: Union[int, float], sigma: Union[int, float], gmin: Union[int, float], gmax: Union[int, float]) -> Union[int, float]:
+def gaussian(
+    x: Union[int, float],
+    mean: Union[int, float],
+    sigma: Union[int, float],
+    gmin: Union[int, float],
+    gmax: Union[int, float],
+) -> Union[int, float]:
     """
     Gaussian distribution function. used for e..g Duquennoy + Mayor 1991
 
@@ -364,14 +403,14 @@ def gaussian(x: Union[int, float], mean: Union[int, float], sigma: Union[int, fl
 #####
 
 
-def Kroupa2001(m: Union[int, float], newopts: dict=None) -> Union[int, float]:
+def Kroupa2001(m: Union[int, float], newopts: dict = None) -> Union[int, float]:
     """
     Probability distribution function for kroupa 2001 IMF, where the default values to the three_part_powerlaw are: default = {"m0": 0.1, "m1": 0.5, "m2": 1, "mmax": 100, "p1": -1.3, "p2": -2.3,"p3": -2.3}
 
     Args:
         m: mass to evaluate the distribution at
         newopts: optional dict to override the default values.
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -403,14 +442,15 @@ def Kroupa2001(m: Union[int, float], newopts: dict=None) -> Union[int, float]:
         value_dict["p3"],
     )
 
-def ktg93(m: Union[int, float], newopts: dict=None) -> Union[int, float]:
+
+def ktg93(m: Union[int, float], newopts: dict = None) -> Union[int, float]:
     """
     Probability distribution function for KTG93 IMF, where the default values to the three_part_powerlaw are: default = {"m0": 0.1, "m1": 0.5, "m2": 1, "mmax": 80, "p1": -1.3, "p2": -2.2,"p3": -2.7}
 
     Args:
         m: mass to evaluate the distribution at
         newopts: optional dict to override the default values.
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -484,7 +524,7 @@ def imf_tinsley1980(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -498,7 +538,7 @@ def imf_scalo1986(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -513,7 +553,7 @@ def imf_scalo1998(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -527,7 +567,7 @@ def imf_chabrier2003(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         'probability' of distribution function evaluated at m
     """
@@ -554,6 +594,7 @@ def imf_chabrier2003(m: Union[int, float]) -> Union[int, float]:
 # Binary fractions
 ########################################################################
 
+
 def Arenou2010_binary_fraction(m: Union[int, float]) -> Union[int, float]:
     """
     Arenou 2010 function for the binary fraction as f(M1)
@@ -563,7 +604,7 @@ def Arenou2010_binary_fraction(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         binary fraction at m
     """
@@ -588,7 +629,7 @@ def raghavan2010_binary_fraction(m: Union[int, float]) -> Union[int, float]:
 
     Args:
         m: mass to evaluate the distribution at
-    
+
     Returns:
         binary fraction at m
     """
@@ -615,15 +656,24 @@ def duquennoy1991(logper: Union[int, float]) -> Union[int, float]:
 
     Args:
         logper: logarithm of period to evaluate the distribution at
-    
+
     Returns:
         'probability' at gaussian(logper, 4.8, 2.3, -2, 12)
     """
     return gaussian(logper, 4.8, 2.3, -2, 12)
 
 
-
-def sana12(M1: Union[int, float], M2: Union[int, float], a: Union[int, float], P: Union[int, float], amin: Union[int, float], amax: Union[int, float], x0: Union[int, float], x1: Union[int, float], p: Union[int, float]) -> Union[int, float]:
+def sana12(
+    M1: Union[int, float],
+    M2: Union[int, float],
+    a: Union[int, float],
+    P: Union[int, float],
+    amin: Union[int, float],
+    amax: Union[int, float],
+    x0: Union[int, float],
+    x1: Union[int, float],
+    p: Union[int, float],
+) -> Union[int, float]:
     """
     distribution of initial orbital periods as found by Sana et al. (2012)
     which is a flat distribution in ln(a) and ln(P) respectively for stars
@@ -637,7 +687,7 @@ def sana12(M1: Union[int, float], M2: Union[int, float], a: Union[int, float], P
     example args: 10, 5, sep(M1, M2, P), sep, ?, -2, 12, -0.55
 
     # TODO: Fix this function!
-    
+
     Args:
         M1: Mass of primary
         M2: Mass of secondary
@@ -648,7 +698,7 @@ def sana12(M1: Union[int, float], M2: Union[int, float], a: Union[int, float], P
         x0: log of minimum period of the distribution (lower bound of the range)
         x1: log of maximum period of the distribution (upper bound of the range)
         p: slope of the distributoon
-    
+
     Returns:
         'probability' of orbital period P given the other parameters
     """
@@ -686,14 +736,17 @@ def sana12(M1: Union[int, float], M2: Union[int, float], a: Union[int, float], P
 
     return res
 
+
 # print(sana12(10, 2, 10, 100, 1, 1000, math.log(10), math.log(1000), 6))
 
 
-def interpolate_in_mass_izzard2012(M: Union[int, float], high: Union[int, float], low: Union[int, float]) -> Union[int, float]:
+def interpolate_in_mass_izzard2012(
+    M: Union[int, float], high: Union[int, float], low: Union[int, float]
+) -> Union[int, float]:
     """
     Function to interpolate in mass
 
-    TODO: fix this function. 
+    TODO: fix this function.
     TODO: describe the args
     high: at M=16.3
     low: at 1.15
@@ -717,7 +770,9 @@ def interpolate_in_mass_izzard2012(M: Union[int, float], high: Union[int, float]
         return (high - low) / (16.3 - 1.15) * (M - 1.15) + low
 
 
-def Izzard2012_period_distribution(P: Union[int, float], M1: Union[int, float], log10Pmin: Union[int, float]=1) ->Union[int, float]:
+def Izzard2012_period_distribution(
+    P: Union[int, float], M1: Union[int, float], log10Pmin: Union[int, float] = 1
+) -> Union[int, float]:
     """
     period distribution which interpolates between
     Duquennoy and Mayor 1991 at low mass (G/K spectral type <~1.15Msun)
@@ -798,19 +853,21 @@ def Izzard2012_period_distribution(P: Union[int, float], M1: Union[int, float],
             * g
         )
 
+
 ########################################################################
 # Mass ratio distributions
 ########################################################################
 
-def flatsections(x: float , opts: dict) -> Union[float, int]:
+
+def flatsections(x: float, opts: dict) -> Union[float, int]:
     """
     Function to generate flat distributions, possibly in multiple sections
-    
+
     Args:
         x: mass ratio value
         opts: list containing the flat sections. Which are themselves dictionaries, with keys "max": upper bound, "min": lower bound and "height": value
 
-    Returns: 
+    Returns:
         probability of that mass ratio.
     """
 
@@ -832,6 +889,7 @@ def flatsections(x: float , opts: dict) -> Union[float, int]:
     # print("flatsections gives C={}: y={}\n",c,y)
     return y
 
+
 # print(flatsections(1, [{'min': 0, 'max': 2, 'height': 3}]))
 
 ########################################################################
diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py
index 45b829a4e9145c862a10d2aca8f01244a72a07f8..a13db153cae96b98090d826b853fc331d1608f4b 100644
--- a/binarycpython/utils/functions.py
+++ b/binarycpython/utils/functions.py
@@ -34,7 +34,7 @@ def verbose_print(message: str, verbosity: int, minimal_verbosity: int) -> None:
     and its minimum verbosity
 
     if verbosity is equal or higher than the minimum, then we print
-    
+
     Args:
         message: message to print
         verbosity: current verbosity level
@@ -45,7 +45,7 @@ def verbose_print(message: str, verbosity: int, minimal_verbosity: int) -> None:
         print(message)
 
 
-def remove_file(file: str, verbosity: int=0) -> None:
+def remove_file(file: str, verbosity: int = 0) -> None:
     """
     Function to remove files but with verbosity
 
@@ -54,13 +54,15 @@ def remove_file(file: str, verbosity: int=0) -> None:
         verbosity: current verbosity level (Optional)
 
     Returns:
-        the path of a subdirectory called binary_c_python in the TMP of the filesystem 
+        the path of a subdirectory called binary_c_python in the TMP of the filesystem
 
     """
 
     if os.path.exists(file):
         if not os.path.isfile(file):
-            verbose_print("This path ({}) is a directory, not a file".format(file), verbosity, 0)
+            verbose_print(
+                "This path ({}) is a directory, not a file".format(file), verbosity, 0
+            )
 
         try:
             verbose_print("Removed {}".format(file), verbosity, 1)
@@ -70,7 +72,7 @@ def remove_file(file: str, verbosity: int=0) -> None:
             print("Error while deleting file {}: {}".format(file, inst))
 
 
-def temp_dir()-> str:
+def temp_dir() -> str:
     """
     Function to return the path the custom logging library shared object
     and script will be written to.
@@ -78,7 +80,7 @@ def temp_dir()-> str:
     Makes use of os.makedirs exist_ok which requires python 3.2+
 
     Returns:
-        the path of a subdirectory called binary_c_python in the TMP of the filesystem 
+        the path of a subdirectory called binary_c_python in the TMP of the filesystem
     """
 
     tmp_dir = tempfile.gettempdir()
@@ -97,7 +99,7 @@ def create_hdf5(data_dir: str, name: str) -> None:
      - data files are selected by checking on files ending with .dat
 
     TODO: fix missing settingsfiles
-    
+
     Args:
         data_dir: directory containing the data files and settings file
         name: name of hdf5file.
@@ -164,7 +166,7 @@ def create_hdf5(data_dir: str, name: str) -> None:
 ########################################################
 
 
-def return_binary_c_version_info(parsed: bool=False) -> Union[str, dict]:
+def return_binary_c_version_info(parsed: bool = False) -> Union[str, dict]:
     """
     Function that returns the version information of binary_c. This function calls the function _binary_c_bindings.return_version_info()
 
@@ -191,7 +193,7 @@ def parse_binary_c_version_info(version_info_string: str) -> dict:
         version_info_string: raw output of version_info call to binary_c
 
     Returns:
-        Parsed version of the version info, which is a dictionary containing the keys: 'isotopes' for isotope info, 'argpairs' for argument pair info (TODO: explain), 'ensembles' for ensemble settings/info, 'macros' for macros, 'elements' for atomic element info, 'DTlimit' for (TODO: explain), 'nucleosynthesis_sources' for nucleosynthesis sources, and 'miscellaneous' for all those that were not caught by the previous groups. 'git_branch', 'git_build', 'revision' and 'email' are also keys, but its clear what those contain.    
+        Parsed version of the version info, which is a dictionary containing the keys: 'isotopes' for isotope info, 'argpairs' for argument pair info (TODO: explain), 'ensembles' for ensemble settings/info, 'macros' for macros, 'elements' for atomic element info, 'DTlimit' for (TODO: explain), 'nucleosynthesis_sources' for nucleosynthesis sources, and 'miscellaneous' for all those that were not caught by the previous groups. 'git_branch', 'git_build', 'revision' and 'email' are also keys, but its clear what those contain.
     """
 
     version_info_dict = {}
@@ -403,16 +405,15 @@ def parse_binary_c_version_info(version_info_string: str) -> dict:
 
 def output_lines(output: str) -> str:
     """
-    Function that outputs the lines that were recieved from the binary_c run, but now as an iterator. 
+    Function that outputs the lines that were recieved from the binary_c run, but now as an iterator.
 
     Args:
         output: raw binary_c output
 
     Returns:
-        Iterator over the lines of the binary_c output        
+        Iterator over the lines of the binary_c output
     """
 
-
     return output.splitlines()
 
 
@@ -438,7 +439,7 @@ def example_parse_output(output: str, selected_header: str) -> dict:
         selected_header: string header of the output (the start of the line that you want to process)
 
     Returns:
-        dictionary containing parameters as keys and lists for the values 
+        dictionary containing parameters as keys and lists for the values
     """
 
     value_dicts = []
@@ -496,7 +497,7 @@ def example_parse_output(output: str, selected_header: str) -> dict:
 ########################################################
 
 
-def get_defaults(filter_values: bool=False) -> dict:
+def get_defaults(filter_values: bool = False) -> dict:
     """
     Function that calls the binaryc get args function and cast it into a dictionary.
 
@@ -537,7 +538,7 @@ def get_arg_keys() -> list:
 def filter_arg_dict(arg_dict: dict) -> dict:
     """
     Function to filter out keys that contain values included in ['NULL', 'Function', '']
-    
+
     This function is called by get_defaults()
 
     Args:
@@ -558,18 +559,20 @@ def filter_arg_dict(arg_dict: dict) -> dict:
     return new_dict
 
 
-def create_arg_string(arg_dict: dict, sort: bool=False, filter_values: bool=False) -> str:
+def create_arg_string(
+    arg_dict: dict, sort: bool = False, filter_values: bool = False
+) -> str:
     """
     Function that creates the arg string for binary_c. Takes a dictionary containing the arguments and writes them to a string
-    This string is missing the 'binary_c ' at the start. 
+    This string is missing the 'binary_c ' at the start.
 
     Args:
-        arg_dict: dictionary 
+        arg_dict: dictionary
         sort: (optional, default = False) Boolean whether to sort the order of the keys.
         filter_values: (optional, default = False) filters the input dict on keys that have NULL or `function` as value.
-        
+
     Returns:
-        The string built up by combining all the key + value's. 
+        The string built up by combining all the key + value's.
     """
 
     arg_string = ""
@@ -578,10 +581,10 @@ def create_arg_string(arg_dict: dict, sort: bool=False, filter_values: bool=Fals
     if filter_values:
         arg_dict = filter_values(arg_dict)
 
-    # 
+    #
     keys = sorted(arg_dict.keys()) if sort else arg_dict.keys()
 
-    # 
+    #
     for key in keys:
         arg_string += "{key} {value} ".format(key=key, value=arg_dict[key])
 
@@ -594,7 +597,9 @@ def create_arg_string(arg_dict: dict, sort: bool=False, filter_values: bool=Fals
 ########################################################
 
 
-def get_help(param_name: str="", print_help: bool=True, fail_silently: bool=False) -> Union[dict, None]:
+def get_help(
+    param_name: str = "", print_help: bool = True, fail_silently: bool = False
+) -> Union[dict, None]:
     """
     Function that returns the help info for a given parameter, by interfacing with binary_c
 
@@ -611,13 +616,13 @@ def get_help(param_name: str="", print_help: bool=True, fail_silently: bool=Fals
     Tasks:
         - TODO: consider not returning None, but return empty dict
 
-    Args: 
+    Args:
         param_name: name of the parameter that you want info from. Will get checked whether its a valid parameter name
         print_help: (optional, default = True) whether to print out the help information
         fail_silently: (optional, default = False) Whether to print the errors raised if the parameter isn't valid
 
     Returns:
-        Dictionary containing the help info. This dictionary contains 'parameter_name', 'parameter_value_input_type', 'description', optionally 'macros' 
+        Dictionary containing the help info. This dictionary contains 'parameter_name', 'parameter_value_input_type', 'description', optionally 'macros'
     """
 
     available_arg_keys = get_arg_keys()
@@ -701,7 +706,7 @@ def get_help(param_name: str="", print_help: bool=True, fail_silently: bool=Fals
         return None
 
 
-def get_help_all(print_help: bool=True) -> dict:
+def get_help_all(print_help: bool = True) -> dict:
     """
     Function that reads out the output of the return_help_all api call to binary_c. This return_help_all binary_c returns all the information for the parameters, their descriptions and other properties. The output is categorized in sections.
 
@@ -814,12 +819,12 @@ def get_help_all(print_help: bool=True) -> dict:
     return help_all_dict
 
 
-def get_help_super(print_help: bool=False, fail_silently: bool=True) -> dict:
+def get_help_super(print_help: bool = False, fail_silently: bool = True) -> dict:
     """
     Function that first runs get_help_all, and then per argument also run
     the help function to get as much information as possible.
-    
-    Args: 
+
+    Args:
         print_help: (optional, default = False) Whether to print the information
         fail_silently: (optional, default = True) Whether to fail silently or to print the errors
 
@@ -889,15 +894,15 @@ def make_build_text() -> str:
         string containing information about the build and the git branch
     """
 
-
     version_info = return_binary_c_version_info(parsed=True)
 
-    git_revision = version_info['miscellaneous']['git_revision']
-    git_branch = version_info['miscellaneous']['git_branch']
-    build_datetime = version_info['miscellaneous']['build']
-
+    git_revision = version_info["miscellaneous"]["git_revision"]
+    git_branch = version_info["miscellaneous"]["git_branch"]
+    build_datetime = version_info["miscellaneous"]["build"]
 
-    info_string = "This information was obtained by the following binary_c build: \n\t**binary_c git branch**: {}\t**binary_c git revision**: {}\t**Built on**: {}".format(git_branch, git_revision, build_datetime)
+    info_string = "This information was obtained by the following binary_c build: \n\t**binary_c git branch**: {}\t**binary_c git revision**: {}\t**Built on**: {}".format(
+        git_branch, git_revision, build_datetime
+    )
 
     return info_string
 
@@ -905,11 +910,11 @@ def make_build_text() -> str:
 def write_binary_c_parameter_descriptions_to_rst_file(output_file: str) -> None:
     """
     Function that calls the get_help_super() to get the help text/descriptions for all the parameters available in that build.
-    Writes the results to a .rst file that can be included in the docs. 
+    Writes the results to a .rst file that can be included in the docs.
 
     Tasks:
         - TODO: add the specific version git branch, git build, git commit, and binary_c version to this document
-    
+
     Args:
         output_file: name of the output .rst faile containing the ReStructuredText formatted output of all the binary_c parameters.
     """
@@ -923,31 +928,39 @@ def write_binary_c_parameter_descriptions_to_rst_file(output_file: str) -> None:
         print("Filename doesn't end with .rst, please provide a proper filename")
         return None
 
-    with open(output_file, 'w') as f:
+    with open(output_file, "w") as f:
 
         print("Binary\\_c parameters", file=f)
-        print("{}".format("="*len("Binary\\_c parameters")), file=f)
-        print("The following chapter contains all the parameters that the current version of binary\\_c can handle, along with their descriptions and other properties.", file=f)
+        print("{}".format("=" * len("Binary\\_c parameters")), file=f)
+        print(
+            "The following chapter contains all the parameters that the current version of binary\\_c can handle, along with their descriptions and other properties.",
+            file=f,
+        )
         print("\n", file=f)
         print(build_info, file=f)
         print("\n", file=f)
 
         for el in arguments_dict.keys():
             print("Section: {}".format(el), file=f)
-            print("{}\n".format("-"*len("Section: {}".format(el))), file=f)
+            print("{}\n".format("-" * len("Section: {}".format(el))), file=f)
             # print(arguments_dict[el]['parameters'].keys())
 
-            for arg in arguments_dict[el]['parameters'].keys():
-                argdict = arguments_dict[el]['parameters'][arg]
+            for arg in arguments_dict[el]["parameters"].keys():
+                argdict = arguments_dict[el]["parameters"][arg]
 
                 print("| **Parameter**: {}".format(argdict["param_name"]), file=f)
                 print("| **Description**: {}".format(argdict["description"]), file=f)
                 if "parameter_value_input_type" in argdict:
-                    print("| **Parameter input type**: {}".format(argdict["parameter_value_input_type"]), file=f)
+                    print(
+                        "| **Parameter input type**: {}".format(
+                            argdict["parameter_value_input_type"]
+                        ),
+                        file=f,
+                    )
                 if "default" in argdict:
                     print("| **Default value**: {}".format(argdict["default"]), file=f)
                 if "macros" in argdict:
-                    print("| **Macros**: {}".format(argdict['macros']), file=f)
+                    print("| **Macros**: {}".format(argdict["macros"]), file=f)
                 if not argdict["rest"] == "(null)":
                     print("| **Extra**: {}".format(argdict["rest"]), file=f)
                 print("", file=f)
@@ -965,8 +978,8 @@ def load_logfile(logfile: str) -> None:
     This function is not finished and shouldn't be used yet.
 
     Tasks:
-        - TODO: 
-    
+        - TODO:
+
     Args:
         - logfile: filename of the logfile you want to parse
 
@@ -1014,7 +1027,9 @@ def load_logfile(logfile: str) -> None:
 ########################################################
 
 
-def inspect_dict(input_dict: dict, indent: int=0, print_structure: bool=True) -> dict:
+def inspect_dict(
+    input_dict: dict, indent: int = 0, print_structure: bool = True
+) -> dict:
     """
     Function to (recursively) inspect a (nested) dictionary.
     The object that is returned is a dictionary containing the key of the input_dict, but as value it will return the type of what the value would be in the input_dict
@@ -1023,16 +1038,16 @@ def inspect_dict(input_dict: dict, indent: int=0, print_structure: bool=True) ->
 
     Args:
         input_dict: dictionary you want to inspect
-        print_structure: (optional, default = True) 
+        print_structure: (optional, default = True)
         indent: (optional, default = 0) indent of the first output
-    
+
     Returns:
-        Dictionary that has the same structure as the input_dict, but as values it has the type(input_dict[key]) (except if the value is a dict)   
+        Dictionary that has the same structure as the input_dict, but as values it has the type(input_dict[key]) (except if the value is a dict)
     """
 
     structure_dict = {}
 
-    # 
+    #
     for key, value in input_dict.items():
         structure_dict[key] = type(value)
 
@@ -1049,11 +1064,11 @@ def inspect_dict(input_dict: dict, indent: int=0, print_structure: bool=True) ->
 
 def merge_dicts(dict_1: dict, dict_2: dict) -> dict:
     """
-    Function to merge two dictionaries in a custom way. 
+    Function to merge two dictionaries in a custom way.
 
     Behaviour:
 
-    When dict keys are only present in one of either: 
+    When dict keys are only present in one of either:
         - we just add the content to the new dict
 
     When dict keys are present in both, we decide based on the value types how to combine them:
@@ -1203,11 +1218,11 @@ def binaryc_json_serializer(obj: Any) -> Any:
     that we want to export.
 
     Function objects will be turned into str representations of themselves
-    
-    Args: 
-        obj: obj being process 
 
-    Returns: 
+    Args:
+        obj: obj being process
+
+    Returns:
         Either string representation of object if the object is a function, or the object itself
     """
 
@@ -1234,4 +1249,3 @@ def handle_ensemble_string_to_json(raw_output):
 
     # return json.loads(json.dumps(ast.literal_eval(raw_output)), cls=binarycDecoder)
     return json.loads(raw_output, cls=binarycDecoder)
-
diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index e73d9719f887aa67ee6758cda7a9a787de604c93..f6cad66956d017803b5537e68e8b1d413092fbc4 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -64,6 +64,7 @@ from binarycpython.utils.hpc_functions import (
 
 from binarycpython import _binary_c_bindings
 
+
 class Population:
     """
     Population Object. Contains all the necessary functions to set up, run and process a
@@ -93,7 +94,7 @@ class Population:
         # Set some memory dicts
         self.persistent_data_memory_dict = {}
 
-        # 
+        #
         self.process_ID = 0
 
     ###################################################
@@ -194,7 +195,7 @@ class Population:
 
     def parse_cmdline(self) -> None:
         """
-        Function to handle settings values via the command line. 
+        Function to handle settings values via the command line.
         Best to be called after all the .set(..) lines, and just before the .evolve() is called
 
         Tasks:
@@ -264,8 +265,8 @@ class Population:
         probdist: str,
         dphasevol: str,
         parameter_name: str,
-        precode: Union[str, None]=None,
-        condition: Union[str, None]=None,
+        precode: Union[str, None] = None,
+        condition: Union[str, None] = None,
     ) -> None:
         """
         Function to add grid variables to the grid_options.
@@ -340,7 +341,7 @@ class Population:
         Function that returns all the options that have been set.
 
         Can be combined with json to make a nice file.
-    
+
         Returns:
             dictionary containing "bse_options", "grid_options", "custom_options"
         """
@@ -374,14 +375,14 @@ class Population:
 
     def return_all_info(
         self,
-        include_population_settings: bool=True,
-        include_binary_c_defaults: bool=True,
-        include_binary_c_version_info: bool=True,
-        include_binary_c_help_all: bool=True,
+        include_population_settings: bool = True,
+        include_binary_c_defaults: bool = True,
+        include_binary_c_version_info: bool = True,
+        include_binary_c_help_all: bool = True,
     ) -> dict:
         """
         Function that returns all the information about the population and binary_c
-    
+
         Args:
             include_population_settings: whether to include the population_settings (see function return_population_settings)
             include_binary_c_defaults: whether to include a dict containing the binary_c parameters and their default values
@@ -417,12 +418,12 @@ class Population:
 
     def export_all_info(
         self,
-        use_datadir: bool=True,
-        outfile: Union[str, None]=None,
-        include_population_settings: bool=True,
-        include_binary_c_defaults: bool=True,
-        include_binary_c_version_info: bool=True,
-        include_binary_c_help_all: bool=True,
+        use_datadir: bool = True,
+        outfile: Union[str, None] = None,
+        include_population_settings: bool = True,
+        include_binary_c_defaults: bool = True,
+        include_binary_c_version_info: bool = True,
+        include_binary_c_help_all: bool = True,
     ) -> None:
         """
         Function that exports the all_info to a json file
@@ -434,7 +435,7 @@ class Population:
             - TODO: Fix to write things to the directory. which options do which etc
             - TODO: theres flawed logic here. rewrite this part pls
             - TODO: consider actually just removing the whole 'output to file' part and let the user do this.
-        
+
         Args:
             include_population_settings: whether to include the population_settings (see function return_population_settings)
             include_binary_c_defaults: whether to include a dict containing the binary_c parameters and their default values
@@ -632,7 +633,7 @@ class Population:
         Entrypoint function of the whole object. From here, based on the settings,
         we set up a SLURM or CONDOR grid, or if no setting is given we go straight
         to evolving the population
-    
+
         There are no direct arguments to this function, rather it is based on the grid_options settings:
             grid_options['slurm']: integer boolean whether to use a slurm_grid evolution
             grid_options['condor']: integer boolean whether to use a condor_grid evolution
@@ -695,23 +696,32 @@ class Population:
 
         # Log and print some information
         verbose_print(
-            "Population-{} finished!".format(self.grid_options['_population_id']), 
-            self.grid_options["verbosity"], 
-            0
+            "Population-{} finished!".format(self.grid_options["_population_id"]),
+            self.grid_options["verbosity"],
+            0,
         )
 
-        if self.grid_options['_errors_found']:
+        if self.grid_options["_errors_found"]:
             # Some information afterwards
             verbose_print(
-                "During the run {} failed systems were found, with a total probability of {} and with the following unique error codes: {} ".format(self.grid_options['_failed_count'], self.grid_options['_failed_prob'], self.grid_options['_failed_systems_error_codes']), 
-                self.grid_options["verbosity"], 
-                0
+                "During the run {} failed systems were found, with a total probability of {} and with the following unique error codes: {} ".format(
+                    self.grid_options["_failed_count"],
+                    self.grid_options["_failed_prob"],
+                    self.grid_options["_failed_systems_error_codes"],
+                ),
+                self.grid_options["verbosity"],
+                0,
             )
             # Some information afterwards
             verbose_print(
-                "The full argline commands for {} these systems have been written to {}".format("ALL" if not self.grid_options['_errors_exceeded'] else "SOME (only the first ones, as there were too many to log all of them)", os.path.join(self.grid_options['tmp_dir'], 'failed_systemsX.txt')),
-                self.grid_options["verbosity"], 
-                0
+                "The full argline commands for {} these systems have been written to {}".format(
+                    "ALL"
+                    if not self.grid_options["_errors_exceeded"]
+                    else "SOME (only the first ones, as there were too many to log all of them)",
+                    os.path.join(self.grid_options["tmp_dir"], "failed_systemsX.txt"),
+                ),
+                self.grid_options["verbosity"],
+                0,
             )
 
         ##
@@ -721,13 +731,15 @@ class Population:
     def _process_run_population(self, ID):
         """
         Function that loops over the whole generator, but only runs systems that fit to: if (localcounter+ID) % self.grid_options["amt_cores"] == 0
-        
-        That way with 4 processes, process 1 runs sytem 0, 4, 8... process 2 runs system 1, 5, 9..., etc 
+
+        That way with 4 processes, process 1 runs sytem 0, 4, 8... process 2 runs system 1, 5, 9..., etc
 
         This function is called by _evolve_population_mp
         """
 
-        self.process_ID = ID # Store the ID as a object property again, lets see if that works. 
+        self.process_ID = (
+            ID  # Store the ID as a object property again, lets see if that works.
+        )
 
         # apparently we have to re-load this for every process, otherwise NameErrors arise (seems like a bug but I'm not sure)
         self._load_grid_function()
@@ -739,7 +751,9 @@ class Population:
         running = True
         localcounter = 0
 
-        verbose_print("Process {} started".format(ID), self.grid_options["verbosity"], 0)
+        verbose_print(
+            "Process {} started".format(ID), self.grid_options["verbosity"], 0
+        )
 
         # Go over the generator
         while running:
@@ -748,7 +762,7 @@ class Population:
                 system = next(generator)
 
                 # Check if the ID is the correct one for this process
-                if (localcounter+ID) % self.grid_options["amt_cores"] == 0:
+                if (localcounter + ID) % self.grid_options["amt_cores"] == 0:
 
                     # Combine that with the other settings
                     full_system_dict = self.bse_options.copy()
@@ -758,26 +772,32 @@ class Population:
                     #     i + 1, self.grid_options["_total_starcount"], full_system_dict
                     # )
 
-                    # 
+                    #
                     print("Process {} is handling system {}".format(ID, localcounter))
 
                     # Evolve the system
                     self._evolve_system_mp(full_system_dict)
 
             except StopIteration:
-                verbose_print("Process {}: generator done".format(ID), self.grid_options["verbosity"], 0)
+                verbose_print(
+                    "Process {}: generator done".format(ID),
+                    self.grid_options["verbosity"],
+                    0,
+                )
                 running = False
 
             localcounter += 1
 
         # Return a set of results and errors
         output_dict = {
-            "results": self.grid_options["results"], 
-            "_failed_count": self.grid_options['_failed_count'], 
-            "_failed_prob": self.grid_options['_failed_prob'],
-            "_failed_systems_error_codes": self.grid_options['_failed_systems_error_codes'],
-            "_errors_exceeded": self.grid_options['_errors_exceeded'],
-            "_errors_found": self.grid_options['_errors_found'],
+            "results": self.grid_options["results"],
+            "_failed_count": self.grid_options["_failed_count"],
+            "_failed_prob": self.grid_options["_failed_prob"],
+            "_failed_systems_error_codes": self.grid_options[
+                "_failed_systems_error_codes"
+            ],
+            "_errors_exceeded": self.grid_options["_errors_exceeded"],
+            "_errors_found": self.grid_options["_errors_found"],
         }
 
         return output_dict
@@ -787,18 +807,18 @@ class Population:
         Function to evolve the population with multiprocessing approach.
         Using pathos to be able to include class-owned functions.
 
-        This function will create a pool with <self.grid_options["amt_cores"]> processes, and perform an imap_unordered to run the different `threads`. 
-        Before this was done by giving a generator as the iterable, and have the processes get a certain chunksize each round. 
-        Later on this seemed to be a bad decision, because it is difficult to pass information back to the main controller, and because with each new batch of systems a new object instance was created. 
+        This function will create a pool with <self.grid_options["amt_cores"]> processes, and perform an imap_unordered to run the different `threads`.
+        Before this was done by giving a generator as the iterable, and have the processes get a certain chunksize each round.
+        Later on this seemed to be a bad decision, because it is difficult to pass information back to the main controller, and because with each new batch of systems a new object instance was created.
 
-        What I do now is I spawn these X amount of processes, and pass a range(self.grid_options["amt_cores"]) as iterable. 
-        In that way, only once do they fetch a `job`, but that job is just a ID number. 
-        With this ID number each thread/process loops over the whole generator, 
-        but only runs the one <ID>'th system (if (localcounter+ID) % self.grid_options["amt_cores"]==0)' 
+        What I do now is I spawn these X amount of processes, and pass a range(self.grid_options["amt_cores"]) as iterable.
+        In that way, only once do they fetch a `job`, but that job is just a ID number.
+        With this ID number each thread/process loops over the whole generator,
+        but only runs the one <ID>'th system (if (localcounter+ID) % self.grid_options["amt_cores"]==0)'
 
         When they are finished, these jobs are instructed to return a set of information (the result dict, TODO: describe what more)
 
-        These resultation dictionaries are then merged and stored as object properties again. 
+        These resultation dictionaries are then merged and stored as object properties again.
         """
 
         # TODO: make further use of a queue to handle jobs or at least
@@ -812,12 +832,16 @@ class Population:
         # TODO: make good example of how to deal with a result_dict
         # https://www.programcreek.com/python/example/58176/multiprocessing.Value
         # https://stackoverflow.com/questions/17377426/shared-variable-in-pythons-multiprocessing
-    
+
         # Create the pool
         pool = Pool(processes=self.grid_options["amt_cores"])
 
         # start the processes by giving them an ID value
-        result = list(pool.imap_unordered(self._process_run_population, range(self.grid_options["amt_cores"])))
+        result = list(
+            pool.imap_unordered(
+                self._process_run_population, range(self.grid_options["amt_cores"])
+            )
+        )
 
         # Handle clean termination of the whole multiprocessing (making sure there are no zombie
         # processes (https://en.wikipedia.org/wiki/Zombie_process))
@@ -835,11 +859,12 @@ class Population:
         self.grid_options["results"] = combined_output_dict["results"]
         self.grid_options["_failed_count"] = combined_output_dict["_failed_count"]
         self.grid_options["_failed_prob"] = combined_output_dict["_failed_prob"]
-        self.grid_options["_failed_systems_error_codes"] = list(set(combined_output_dict["_failed_systems_error_codes"]))        
+        self.grid_options["_failed_systems_error_codes"] = list(
+            set(combined_output_dict["_failed_systems_error_codes"])
+        )
         self.grid_options["_errors_exceeded"] = combined_output_dict["_errors_exceeded"]
         self.grid_options["_errors_found"] = combined_output_dict["_errors_found"]
 
-
     def _evolve_population_lin(self):
         """
         Function to evolve the population linearly (i.e. 1 core, no multiprocessing methods)
@@ -864,7 +889,6 @@ class Population:
             if self.grid_options["parse_function"]:
                 self.grid_options["parse_function"](self, out)
 
-
     def _evolve_system_mp(self, full_system_dict):
         """
         Function that the multiprocessing evolution method calls to evolve a system
@@ -887,17 +911,17 @@ class Population:
         # Check for errors
         _ = self._check_binary_c_error(out, full_system_dict)
 
-        # Have some user-defined function do stuff with the data. 
+        # Have some user-defined function do stuff with the data.
         if self.grid_options["parse_function"]:
             self.grid_options["parse_function"](self, out)
 
     # Single system
-    def evolve_single(self, clean_up_custom_logging_files: bool=True) -> Any:
+    def evolve_single(self, clean_up_custom_logging_files: bool = True) -> Any:
         """
         Function to run a single system, based on the settings in the grid_options
 
         The output of the run gets returned, unless a parse function is given to this function.
-        
+
         Args:
             clean_up_custom_logging_files: whether the clean up all the custom_logging files.
 
@@ -1504,7 +1528,7 @@ class Population:
 
     def _load_grid_function(self):
         """
-        Functon that loads the script containing the grid code. 
+        Functon that loads the script containing the grid code.
 
         TODO: Update this description
         Test function to run grid stuff. mostly to test the import
@@ -2142,7 +2166,10 @@ class Population:
     ###################################################
 
     def write_binary_c_calls_to_file(
-        self, output_dir: Union[str, None]=None, output_filename: Union[str, None]=None, include_defaults: bool=False
+        self,
+        output_dir: Union[str, None] = None,
+        output_filename: Union[str, None] = None,
+        include_defaults: bool = False,
     ) -> None:
         """
         Function that loops over the gridcode and writes the generated parameters to a file.
@@ -2159,10 +2186,10 @@ class Population:
 
         Tasks:
             - TODO: test this function
-    
+
         Args:
             output_dir: (optional, default = None) directory where to write the file to. If custom_options['data_dir'] is present, then that one will be used first, and then the output_dir
-            output_filename: (optional, default = None) filename of the output. If not set it will be called "binary_c_calls.txt" 
+            output_filename: (optional, default = None) filename of the output. If not set it will be called "binary_c_calls.txt"
             include_defaults: (optional, default = None) whether to include the defaults of binary_c in the lines that are written. Beware that this will result in very long lines, and it might be better to just export the binary_c defaults and keep them in a seperate file.
         """
 
@@ -2361,7 +2388,7 @@ class Population:
 
     def _check_binary_c_error(self, binary_c_output, system_dict):
         """
-        Function to check whether binary_c throws an error and handle accordingly. 
+        Function to check whether binary_c throws an error and handle accordingly.
         """
 
         if binary_c_output.startswith("SYSTEM_ERROR"):
@@ -2372,16 +2399,21 @@ class Population:
             )
 
             # Keep track of the amount of failed systems and their error codes
-            self.grid_options['_failed_prob'] += system_dict['probability']
-            self.grid_options['_failed_count'] += 1 
-            self.grid_options['_errors_found'] = True
+            self.grid_options["_failed_prob"] += system_dict["probability"]
+            self.grid_options["_failed_count"] += 1
+            self.grid_options["_errors_found"] = True
 
-            # Try catching the error code and keep track of the unique ones. 
+            # Try catching the error code and keep track of the unique ones.
             try:
-                error_code = int(binary_c_output.splitlines()[0].split("with error code")[-1].split(":")[0].strip())
+                error_code = int(
+                    binary_c_output.splitlines()[0]
+                    .split("with error code")[-1]
+                    .split(":")[0]
+                    .strip()
+                )
 
-                if not error_code in self.grid_options['_failed_systems_error_codes']:
-                    self.grid_options['_failed_systems_error_codes'].append(error_code)
+                if not error_code in self.grid_options["_failed_systems_error_codes"]:
+                    self.grid_options["_failed_systems_error_codes"].append(error_code)
             except ValueError:
                 verbose_print(
                     "Failed to extract the error-code",
@@ -2390,20 +2422,35 @@ class Population:
                 )
 
             # Check if we have exceeded the amount of errors
-            if self.grid_options['_failed_count'] > self.grid_options['failed_systems_threshold']:
-                if not self.grid_options['_errors_exceeded']:
+            if (
+                self.grid_options["_failed_count"]
+                > self.grid_options["failed_systems_threshold"]
+            ):
+                if not self.grid_options["_errors_exceeded"]:
                     verbose_print(
-                        "Process {} exceeded the maximum ({}) amount of failing systems. Stopped logging them to files now".format(self.process_ID, self.grid_options['failed_systems_threshold']),
+                        "Process {} exceeded the maximum ({}) amount of failing systems. Stopped logging them to files now".format(
+                            self.process_ID,
+                            self.grid_options["failed_systems_threshold"],
+                        ),
                         self.grid_options["verbosity"],
                         1,
                     )
-                    self.grid_options['_errors_exceeded'] = True
+                    self.grid_options["_errors_exceeded"] = True
 
             # If not, write the failing systems to files unique to each process
             else:
                 # Write arglines to file
                 argstring = self._return_argline(system_dict)
-                with open(os.path.join(self.grid_options['tmp_dir'], 'failed_systems_{}_process_{}.txt'.format(self.grid_options['_population_id'], self.process_ID)), 'a+') as f:
-                    f.write(argstring+"\n")
+                with open(
+                    os.path.join(
+                        self.grid_options["tmp_dir"],
+                        "failed_systems_{}_process_{}.txt".format(
+                            self.grid_options["_population_id"], self.process_ID
+                        ),
+                    ),
+                    "a+",
+                ) as f:
+                    f.write(argstring + "\n")
+
 
 ################################################################################################
diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py
index b3fb7e576c4fadd19f96682ab4965cd54881cc95..96f4c0dc4b9c5e16304c28b4f906dfcd695e081e 100644
--- a/binarycpython/utils/grid_options_defaults.py
+++ b/binarycpython/utils/grid_options_defaults.py
@@ -57,7 +57,7 @@ grid_options_defaults_dict = {
     # This will get parsed by autogen_C_logging_code in custom_loggion_functions.py
     "C_logging_code": None,  # Should contain a string which holds the logging code.
     "custom_logging_func_memaddr": -1,  # Contains the custom_logging functions memory address
-    "_custom_logging_shared_library_file": None, # file containing the .so file
+    "_custom_logging_shared_library_file": None,  # file containing the .so file
     ##########################
     # Store pre-loading:
     ##########################
@@ -67,7 +67,7 @@ grid_options_defaults_dict = {
     # Log args: logging of arguments
     ##########################
     "log_args": 0,  # unused
-    "log_args_dir": "/tmp/", # unused
+    "log_args_dir": "/tmp/",  # unused
     ##########################
     # Population evolution
     ##########################
@@ -83,23 +83,23 @@ grid_options_defaults_dict = {
     "_population_type_options": [
         "grid",
         "source_file",
-    ],  # Available choices for type of population generation. Unused for now. # TODO: fill later with monte carlo etc 
+    ],  # Available choices for type of population generation. Unused for now. # TODO: fill later with monte carlo etc
     "source_file_filename": None,  # filename for the source
     "_count": 0,  # count of systems
-    "_total_starcount": 0, # Total count of systems in this generator
+    "_total_starcount": 0,  # Total count of systems in this generator
     "_probtot": 0,  # total probability
     "_weight": 1.0,  # weighting for the probability
     "_repeat": 1.0,  # number of times to repeat each system (probability is adjusted to be 1/repeat)
-    "results": {}, # dict to store the results. Every process fills this on its own and then it will be joined later
+    "results": {},  # dict to store the results. Every process fills this on its own and then it will be joined later
     "_start_time_evolution": 0,  # Start time of the grid
     "_end_time_evolution": 0,  # end time of the grid
     "_errors_found": False,  # Flag whether there are any errors from binary_c
-    "_errors_exceeded": False, # Flag whether the amt of errors have exceeded the limit
+    "_errors_exceeded": False,  # Flag whether the amt of errors have exceeded the limit
     "_failed_count": 0,  # amt of failed systems
     "_failed_prob": 0,  # Summed probability of failed systems
-    "failed_systems_threshold": 20, # Maximum failed systems per process allowed to fail before the process stops logging the failing systems. 
-    "_failed_systems_error_codes": [], # List to store the unique error codes
-    "_population_id": 0,  # Random id of this grid/population run, Unique code for the population. Should be set only once by the controller process. 
+    "failed_systems_threshold": 20,  # Maximum failed systems per process allowed to fail before the process stops logging the failing systems.
+    "_failed_systems_error_codes": [],  # List to store the unique error codes
+    "_population_id": 0,  # Random id of this grid/population run, Unique code for the population. Should be set only once by the controller process.
     "modulo": 1,  # run modulo n of the grid. #TODO: fix this
     ## Grid type evolution
     "_grid_variables": {},  # grid variables
@@ -425,80 +425,93 @@ grid_options_defaults_dict = {
 
 # Grid containing the descriptions of the options # TODO: add input types for all of them
 grid_options_descriptions = {
-    'tmp_dir': "Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise", # TODO: improve this
-    '_binary_c_dir': 'Director where binary_c is stored. This options are not really used',
-    '_binary_c_config_executable': 'Full path of the binary_c-config executable. This options is not used in the population object.',
-    '_binary_c_executable': 'Full path to the binary_c executable. This options is not used in the population object.',
-    '_binary_c_shared_library': "Full path to the libbinary_c file. This options is not used in the population object",
-    'verbosity': 'Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.',
-    'binary': "Set this to 1 if the population contains binaries. Input: int", # TODO: write what effect this has.
-    'amt_cores': "The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int",
-    '_start_time_evolution': "Variable storing the start timestamp of the population evolution. Set by the object itself.", # TODO: make sure this is logged to a file    
-    '_end_time_evolution': "Variable storing the end timestamp of the population evolution. Set by the object itself", # TODO: make sure this is logged to a file
-    '_total_starcount': "Variable storing the total amount of systems in the generator. Used and set by the population object.",
-    '_custom_logging_shared_library_file': "filename for the custom_logging shared library. Used and set by the population object",
-    '_errors_found': "Variable storing a boolean flag whether errors by binary_c are encountered.",
-    '_errors_exceeded': "Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.",
-    'source_file_filename': "Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.", # TODO: Expand 
-    'results': "Dictionary in which the user can place their results. This dictionary gets merged at the end of a mulitprocessing simulation.",   
-    'C_auto_logging': "Dictionary containing parameters to be logged by binary_c. The structure of this dictionary is as follows: the key is used as the headline which the user can then catch. The value at that key is a list of binary_c system parameters (like star[0].mass)",
-    'C_logging_code': "Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.",
-    '_failed_count': "Variable storing the amount of failed systems.",
-    '_evolution_type_options': "List containing the evolution type options.",
-    '_failed_prob': "Variable storing the total probability of all the failed systems",
-    '_failed_systems_error_codes': "List storing the unique error codes raised by binary_c of the failed systems",
-    '_grid_variables': "Dictionary storing the grid_variables. These contain properties which are accessed by the _generate_grid_code function",
-    '_population_id': "Variable storing a unique 32-char hex string.",
-    '_commandline_input': "String containing the arguments passed to the population object via the command line. Set and used by the population object.",
-    '_system_generator': "Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.",
-    'gridcode_filename': "Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.", 
-    'log_args': "Boolean to log the arguments. Unused ", # TODO: fix the functionality for this and describe it properly
-    'log_args_dir': "Directory to log the arguments to. Unused", # TODO: fix the functionality for this and describe it properly
-    'log_file': "Log file for the population object. Unused", # TODO: fix the functionality for this and describe it properly 
-    'custom_logging_func_memaddr': "Memory adress where the custom_logging_function is stored. Input: int",
-    '_count': "Counter tracking which system the generator is on.",
-    '_probtot': "Total probability of the population.", # TODO: check whether this is used properly throughout
-    '_main_pid': "Main process ID of the master process. Used and set by the population object.",
-    '_store_memaddr': "Memory adress of the store object for binary_c.",
-    'failed_systems_threshold': "Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files",
-    'parse_function': "Function that the user can provide to handle the output the binary_c. This function has to take the arguments (self, output). Its best not to return anything in this function, and just store stuff in the grid_options['results'] dictionary, or just output results to a file",
-    'condor': "Int flag whether to use a condor type population evolution.", # TODO: describe this in more detail
-    'slurm': "Int flag whether to use a slurm type population evolution.", # TODO: describe this in more detail
-    'population_type': "variable storing what kind of population type should be evolved. See population_type_options for the options.", # TODO: make this functionality work properly
-    '_population_type_options': "List storing the population_type options.",
-    '_weight': "Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.", # TODO: add more info here, regarding the evolution splitting.
-    '_repeat': "Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.", # TODO: make sure this is used.
-    'evolution_type': "Variable containing the type of evolution used of the grid. Multiprocessing or linear processing",
+    "tmp_dir": "Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise",  # TODO: improve this
+    "_binary_c_dir": "Director where binary_c is stored. This options are not really used",
+    "_binary_c_config_executable": "Full path of the binary_c-config executable. This options is not used in the population object.",
+    "_binary_c_executable": "Full path to the binary_c executable. This options is not used in the population object.",
+    "_binary_c_shared_library": "Full path to the libbinary_c file. This options is not used in the population object",
+    "verbosity": "Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.",
+    "binary": "Set this to 1 if the population contains binaries. Input: int",  # TODO: write what effect this has.
+    "amt_cores": "The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int",
+    "_start_time_evolution": "Variable storing the start timestamp of the population evolution. Set by the object itself.",  # TODO: make sure this is logged to a file
+    "_end_time_evolution": "Variable storing the end timestamp of the population evolution. Set by the object itself",  # TODO: make sure this is logged to a file
+    "_total_starcount": "Variable storing the total amount of systems in the generator. Used and set by the population object.",
+    "_custom_logging_shared_library_file": "filename for the custom_logging shared library. Used and set by the population object",
+    "_errors_found": "Variable storing a boolean flag whether errors by binary_c are encountered.",
+    "_errors_exceeded": "Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.",
+    "source_file_filename": "Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.",  # TODO: Expand
+    "results": "Dictionary in which the user can place their results. This dictionary gets merged at the end of a mulitprocessing simulation.",
+    "C_auto_logging": "Dictionary containing parameters to be logged by binary_c. The structure of this dictionary is as follows: the key is used as the headline which the user can then catch. The value at that key is a list of binary_c system parameters (like star[0].mass)",
+    "C_logging_code": "Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.",
+    "_failed_count": "Variable storing the amount of failed systems.",
+    "_evolution_type_options": "List containing the evolution type options.",
+    "_failed_prob": "Variable storing the total probability of all the failed systems",
+    "_failed_systems_error_codes": "List storing the unique error codes raised by binary_c of the failed systems",
+    "_grid_variables": "Dictionary storing the grid_variables. These contain properties which are accessed by the _generate_grid_code function",
+    "_population_id": "Variable storing a unique 32-char hex string.",
+    "_commandline_input": "String containing the arguments passed to the population object via the command line. Set and used by the population object.",
+    "_system_generator": "Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.",
+    "gridcode_filename": "Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.",
+    "log_args": "Boolean to log the arguments. Unused ",  # TODO: fix the functionality for this and describe it properly
+    "log_args_dir": "Directory to log the arguments to. Unused",  # TODO: fix the functionality for this and describe it properly
+    "log_file": "Log file for the population object. Unused",  # TODO: fix the functionality for this and describe it properly
+    "custom_logging_func_memaddr": "Memory adress where the custom_logging_function is stored. Input: int",
+    "_count": "Counter tracking which system the generator is on.",
+    "_probtot": "Total probability of the population.",  # TODO: check whether this is used properly throughout
+    "_main_pid": "Main process ID of the master process. Used and set by the population object.",
+    "_store_memaddr": "Memory adress of the store object for binary_c.",
+    "failed_systems_threshold": "Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files",
+    "parse_function": "Function that the user can provide to handle the output the binary_c. This function has to take the arguments (self, output). Its best not to return anything in this function, and just store stuff in the grid_options['results'] dictionary, or just output results to a file",
+    "condor": "Int flag whether to use a condor type population evolution.",  # TODO: describe this in more detail
+    "slurm": "Int flag whether to use a slurm type population evolution.",  # TODO: describe this in more detail
+    "population_type": "variable storing what kind of population type should be evolved. See population_type_options for the options.",  # TODO: make this functionality work properly
+    "_population_type_options": "List storing the population_type options.",
+    "_weight": "Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.",  # TODO: add more info here, regarding the evolution splitting.
+    "_repeat": "Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.",  # TODO: make sure this is used.
+    "evolution_type": "Variable containing the type of evolution used of the grid. Multiprocessing or linear processing",
 }
 
 #################################
 # Grid options functions
 
 # Utility functions
-def grid_options_help(option: str) -> None:
+def grid_options_help(option: str) -> dict:
     """
     Function that prints out the description of a grid option. Useful function for the user.
 
     Args:
         option: which option you want to have the description of
+
+    returns:
+        dict containg the option, the description if its there, otherwise empty string. And if the key doesnt exist, the dict is empty
     """
 
     option_keys = grid_options_defaults_dict.keys()
     description_keys = grid_options_descriptions.keys()
 
     if not option in option_keys:
-        print("Error: This is an invalid entry. Option does not exist, please choose from the following options:\n\t{}".format(', '.join(option_keys)))
+        print(
+            "Error: This is an invalid entry. Option does not exist, please choose from the following options:\n\t{}".format(
+                ", ".join(option_keys)
+            )
+        )
+        return {}
+
     else:
         if not option in description_keys:
-            print("This option has not been described properly yet. Please contact on of the authors")
-
+            print(
+                "This option has not been described properly yet. Please contact on of the authors"
+            )
+            return {option: ""}
         else:
             print(grid_options_descriptions[option])
+            return {option: grid_options_descriptions[option]}
+
 
-def grid_options_description_checker(print_info: bool=True) -> int:
+def grid_options_description_checker(print_info: bool = True) -> int:
     """
-    Function that checks which descriptions are missing 
-    
+    Function that checks which descriptions are missing
+
     Args:
         print_info: whether to print out information about which options contain proper descriptions and which do not
 
@@ -510,19 +523,28 @@ def grid_options_description_checker(print_info: bool=True) -> int:
     option_keys = grid_options_defaults_dict.keys()
     description_keys = grid_options_descriptions.keys()
 
-    # 
-    undescribed_keys = list(set(option_keys)-set(description_keys))
+    #
+    undescribed_keys = list(set(option_keys) - set(description_keys))
 
     if undescribed_keys:
         if print_info:
-            print("Warning: the following keys have no description yet:\n\t{}".format(", ".join(sorted(undescribed_keys))))
-            print("Total description progress: {:.2f}%%".format(100 * len(description_keys)/len(option_keys)))
+            print(
+                "Warning: the following keys have no description yet:\n\t{}".format(
+                    ", ".join(sorted(undescribed_keys))
+                )
+            )
+            print(
+                "Total description progress: {:.2f}%%".format(
+                    100 * len(description_keys) / len(option_keys)
+                )
+            )
     return len(undescribed_keys)
 
+
 def write_grid_options_to_rst_file(output_file: str) -> None:
     """
     Function that writes the descriptions of the grid options to a rst file
-    
+
     Tasks:
         TODO: seperate things into private and public options
 
@@ -546,34 +568,57 @@ def write_grid_options_to_rst_file(output_file: str) -> None:
         print("Filename doesn't end with .rst, please provide a proper filename")
         return None
 
-    with open(output_file, 'w') as f:
+    with open(output_file, "w") as f:
         print("Population grid code options", file=f)
-        print("{}".format("="*len("Population grid code options")), file=f)
-        print("The following chapter contains all grid code options, along with their descriptions", file=f)
-        print("There are {} options that are not described yet.".format(len(not_described_yet)), file=f)
+        print("{}".format("=" * len("Population grid code options")), file=f)
+        print(
+            "The following chapter contains all grid code options, along with their descriptions",
+            file=f,
+        )
+        print(
+            "There are {} options that are not described yet.".format(
+                len(not_described_yet)
+            ),
+            file=f,
+        )
         print("\n", file=f)
 
         # Start public options part
         print("Public options", file=f)
-        print("{}".format("-"*len("Public options")), file=f)
+        print("{}".format("-" * len("Public options")), file=f)
         print("The following options are meant to be changed by the user.", file=f)
         print("\n", file=f)
 
         for public_option in sorted(public_options):
             if public_option in descriptions:
-                print("| **{}**: {}".format(public_option, descriptions[public_option]), file=f)
+                print(
+                    "| **{}**: {}".format(public_option, descriptions[public_option]),
+                    file=f,
+                )
             else:
-                print("| **{}**: No description available yet".format(public_option), file=f)
+                print(
+                    "| **{}**: No description available yet".format(public_option),
+                    file=f,
+                )
             print("", file=f)
 
         # Start private options part
         print("Private options", file=f)
-        print("{}".format("-"*len("Private options")), file=f)
-        print("The following options are not meant to be changed by the user, as these options are used and set internally by the object itself. The description still is provided, but just for documentation purposes.", file=f)
+        print("{}".format("-" * len("Private options")), file=f)
+        print(
+            "The following options are not meant to be changed by the user, as these options are used and set internally by the object itself. The description still is provided, but just for documentation purposes.",
+            file=f,
+        )
 
         for private_option in sorted(private_options):
             if private_option in descriptions:
-                print("| **{}**: {}".format(private_option, descriptions[private_option]), file=f)
+                print(
+                    "| **{}**: {}".format(private_option, descriptions[private_option]),
+                    file=f,
+                )
             else:
-                print("| **{}**: No description available yet".format(private_option), file=f)
+                print(
+                    "| **{}**: No description available yet".format(private_option),
+                    file=f,
+                )
             print("", file=f)
diff --git a/binarycpython/utils/hpc_functions.py b/binarycpython/utils/hpc_functions.py
index bc085032f2081ce97189eaa8d31c5ce65e96670f..043614b356517cc33cd1ef171bf7c224660f5959 100644
--- a/binarycpython/utils/hpc_functions.py
+++ b/binarycpython/utils/hpc_functions.py
@@ -51,7 +51,7 @@ def get_condor_version() -> Union[str, None]:
     otherwise returns None
 
     Result has to be condor v8 or higher
-    
+
     Returns:
         condor version, or None
     """
diff --git a/binarycpython/utils/plot_functions.py b/binarycpython/utils/plot_functions.py
index f68aa62e78e980edcb63022ca163884a4842fea6..3312dea11a2c264eae3ee888ee5aa8acc21f1bd5 100644
--- a/binarycpython/utils/plot_functions.py
+++ b/binarycpython/utils/plot_functions.py
@@ -91,7 +91,10 @@ def color_by_index(row, column, colors):
 
 
 def plot_HR_diagram(
-    df, show_stellar_types: bool=False, show_plot: bool=True, use_astropy_values: bool=True
+    df,
+    show_stellar_types: bool = False,
+    show_plot: bool = True,
+    use_astropy_values: bool = True,
 ):
     """
     Function to plot the HR diagram evolution of the system. Assumes its a binary system.
@@ -113,7 +116,7 @@ def plot_HR_diagram(
     Plots:
         - luminosity_1 vs teff_1
         - luminosity_2 vs teff_2
-    
+
     Tasks:
         - TODO: add HD limit
         - TODO: add lines of constant radius
@@ -125,7 +128,7 @@ def plot_HR_diagram(
         use_astropy_values: Whether to use astropy values for for Rsun, Lsun and stefan boltzman constant.
 
     Returns
-        returns a figure object if show_plot is false        
+        returns a figure object if show_plot is false
 
     """
 
@@ -223,7 +226,7 @@ def plot_HR_diagram(
         return fig
 
 
-def plot_orbit(df, show_stellar_types:bool =False, show_plot:bool =True):
+def plot_orbit(df, show_stellar_types: bool = False, show_plot: bool = True):
     """
     Function to plot the orbital elements of the system
 
@@ -238,7 +241,7 @@ def plot_orbit(df, show_stellar_types:bool =False, show_plot:bool =True):
         show_plot: whether to actually show the plot. If false: returns the figure object
 
     Returns
-        returns a figure object if show_plot is false        
+        returns a figure object if show_plot is false
     """
 
     if show_stellar_types:
@@ -278,7 +281,7 @@ def plot_orbit(df, show_stellar_types:bool =False, show_plot:bool =True):
         return fig
 
 
-def plot_masses(df, show_stellar_types: bool=False, show_plot: bool=True):
+def plot_masses(df, show_stellar_types: bool = False, show_plot: bool = True):
     """
     Function to plot the masses of the system.
 
@@ -374,7 +377,7 @@ def dummy():
 def parse_function_hr_diagram(output: str):
     """
     Parsing function for the HR plotting routine
-    
+
     Args:
         output: raw binary_c output string
 
@@ -495,7 +498,7 @@ def parse_function_masses(output: str):
 def plot_system(plot_type, **kwargs):
     """
     Function to plot the different quantities of a system.
-        
+
     This goes (in general) via the following steps:
         - a preset custom logging for a specific plotting routine is loaded, depending on the choice of plot_type
         - This is used for the run_system call
@@ -518,13 +521,13 @@ def plot_system(plot_type, **kwargs):
     Args:
         plot_type: string input should be one of ['mass_evolution', 'orbit_evolution', 'hr_diagram'].
             Input will be matched against this, and then go through a dictionary to pick the correct plotting function.
-        
+
         return_fig: boolean whether to return the fig object instead of plotting the plot
             (makes so that you can customize it)
-        
+
         show_stellar_types: whether to plot the stellar type evolution on a second pane.
             This is not included in all the plotting routines.
-        
+
         Other input: other kwargs that are passed to run_system
             (inspect the docstring of run_system for more info)
 
diff --git a/binarycpython/utils/run_system_wrapper.py b/binarycpython/utils/run_system_wrapper.py
index 0f45f48953a6a73f562887c431bb12731a2069cf..7a24b4fe0cd0e9e30c59fb6bd5f164485ad67cd5 100644
--- a/binarycpython/utils/run_system_wrapper.py
+++ b/binarycpython/utils/run_system_wrapper.py
@@ -15,6 +15,7 @@ from binarycpython.utils.custom_logging_functions import (
 
 from binarycpython import _binary_c_bindings
 
+
 def run_system(**kwargs):
     """
     Function that runs a system.
diff --git a/binarycpython/utils/spacing_functions.py b/binarycpython/utils/spacing_functions.py
index 4dbea809a94e37dbfce80cc0e9d39b7968dc294d..5cdf3522d857dce357ed8202e77f1e015819d95c 100644
--- a/binarycpython/utils/spacing_functions.py
+++ b/binarycpython/utils/spacing_functions.py
@@ -9,10 +9,12 @@ from typing import Union
 import numpy as np
 
 
-def const(min_bound: Union[int, float], max_bound: Union[int, float], steps: int) -> list:
+def const(
+    min_bound: Union[int, float], max_bound: Union[int, float], steps: int
+) -> list:
     """
     Samples a range linearly. Uses numpy linspace.
-    
+
     Args:
         min_bound: lower bound of range
         max_bound: upper bound of range
diff --git a/binarycpython/utils/useful_funcs.py b/binarycpython/utils/useful_funcs.py
index e4c01374914a0b78efdcd2cfe071152a8f8586f1..bff269388991cbb2caf094210b2f446aa5cedb9c 100644
--- a/binarycpython/utils/useful_funcs.py
+++ b/binarycpython/utils/useful_funcs.py
@@ -22,7 +22,9 @@ AURSUN = 2.150445198804013386961742071435e02
 YEARDY = 3.651995478818308811241877265275e02
 
 
-def calc_period_from_sep(M1: Union[int, float], M2: Union[int, float], sep: Union[int, float]) -> Union[int, float]:
+def calc_period_from_sep(
+    M1: Union[int, float], M2: Union[int, float], sep: Union[int, float]
+) -> Union[int, float]:
     """
     calculate period from separation
 
@@ -30,15 +32,17 @@ def calc_period_from_sep(M1: Union[int, float], M2: Union[int, float], sep: Unio
         M1: Primary mass in solar mass
         M2: Secondary mass in solar mass
         sep: Separation in solar radii
-    
-    Returns: 
+
+    Returns:
         period in years
     """
 
     return YEARDY * (sep / AURSUN) * math.sqrt(sep / (AURSUN * (M1 + M2)))
 
 
-def calc_sep_from_period(M1: Union[int, float], M2: Union[int, float], period: Union[int, float]) -> Union[int, float]:
+def calc_sep_from_period(
+    M1: Union[int, float], M2: Union[int, float], period: Union[int, float]
+) -> Union[int, float]:
     """
     Calculate separation from period.
 
@@ -48,7 +52,7 @@ def calc_sep_from_period(M1: Union[int, float], M2: Union[int, float], period: U
         M1: Primary mass in solar mass
         M2: Secondary mass in solar mass
         period: Period of binary in days
-    
+
     Returns:
         Separation in solar radii
     """
@@ -59,7 +63,7 @@ def calc_sep_from_period(M1: Union[int, float], M2: Union[int, float], period: U
 def roche_lobe(q: Union[int, float]) -> Union[int, float]:
     """
     A function to evaluate R_L/a(q), Eggleton 1983.
-    
+
     # TODO: check the definition of the mass ratio
     # TODO: check whether the logs are correct
 
@@ -77,19 +81,25 @@ def roche_lobe(q: Union[int, float]) -> Union[int, float]:
 def ragb(m: Union[int, float], z: Union[int, float]) -> Union[int, float]:
     """
     Function to calculate radius of a star in units of solar radii at first thermal pulse as a function of mass (Z=0.02 only, but also good for Z=0.0001)
-    
+
     Args:
         m: mass of star in units of solar mass
         z: metallicity of star
 
-    Returns: 
+    Returns:
         radius at first thermal pulse in units of solar radii
     """
 
     return m * 40.0 + 20.0
 
 
-def zams_collission(m1: Union[int, float], m2: Union[int, float], sep: Union[int, float], e: Union[int, float], z: Union[int, float]) -> Union[int, float]:
+def zams_collission(
+    m1: Union[int, float],
+    m2: Union[int, float],
+    sep: Union[int, float],
+    e: Union[int, float],
+    z: Union[int, float],
+) -> Union[int, float]:
     """
     given m1,m2, separation and eccentricity (and metallicity)
     determine if two stars collide on the ZAMS
@@ -120,8 +130,8 @@ def zams_collission(m1: Union[int, float], m2: Union[int, float], sep: Union[int
 def rzams(m, z):
     """
     Function to determine the radius of a ZAMS star as a function of m and z:
-    
-    Based on the fits of Tout et al., 1996, MNRAS, 281, 257 
+
+    Based on the fits of Tout et al., 1996, MNRAS, 281, 257
 
     Args:
         m: mass of star in solar mass