From c12f579ffb933afbb86738f39bfe545415200bf5 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Sat, 7 Sep 2019 14:10:37 +0100
Subject: [PATCH] cleanup for release: improved comments in header files.

added "pragma once" to the version header file (made by configure)

updated README, CHANGES

fixed some macro names
---
 CHANGES                           |  12 ++
 README                            |  30 +++--
 configure                         |   2 +-
 src/binary_c.h                    |  20 ++-
 src/binary_c_code_options.h       |  15 +++
 src/binary_c_debug.h              |  18 ++-
 src/binary_c_derivatives.h        |  26 +++-
 src/binary_c_error_codes.h        |  17 ++-
 src/binary_c_event_structures.h   |  19 +++
 src/binary_c_exit_macros.h        |  18 +++
 src/binary_c_exit_prototypes.h    |  18 ++-
 src/binary_c_function_macros.h    |  18 ++-
 src/binary_c_macros.h             |  24 +++-
 src/binary_c_main.h               |  20 +++
 src/binary_c_main_macros.h        |  18 ++-
 src/binary_c_maths.h              |  24 +++-
 src/binary_c_objects.h            |  23 +++-
 src/binary_c_parameters.h         |  35 ++++--
 src/binary_c_physical_constants.h |  22 +++-
 src/binary_c_prototypes.h         |  24 +++-
 src/binary_c_stellar_parameters.h |  24 +++-
 src/binary_c_stellar_types.h      |  32 +++--
 src/binary_c_string_macros.h      |  18 ++-
 src/binary_c_structures.h         |  30 ++++-
 src/binary_c_types.h              |  21 +++-
 src/binary_c_unit_tests.h         | 195 ++++++++++++++++--------------
 src/binary_c_version.h            |  17 ++-
 src/evolution/evolve_system.c     |  17 ++-
 src/main.c                        |  16 +++
 src/main2.c                       |  21 +++-
 src/nucsyn/nucsyn_strip_and_mix.c |   4 +-
 src/opacity/opacity_STARS.c       |   2 +-
 src/tables/table_TAMS.h           |   2 +-
 33 files changed, 630 insertions(+), 172 deletions(-)

diff --git a/CHANGES b/CHANGES
index c49feaafc..a7d527236 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,15 @@
+07/09/2019 Final cleanup for V2.1
+
+There were issues with old/new gcc clashes on our slurm cluster: this
+was because binary_grid was using "cc" to build, which was an old gcc 4.8,
+rather than "$CC" which was gcc 9.2. The former had no C99 support, so
+Booleans were mapped to 4-byte ints, while binary_c and libbinary_c were
+built with 1-byte Bool types. This caused problems, but has been fixed. In
+future, just build your Perl (with perlbrew) and binary_c with the same
+compiler. I've added gnu99 to the build options in the hope of preventing
+this from happening again.
+
+Lots of code cleanup as well.
 
 04/09/2019 More prep for V2.1
 
diff --git a/README b/README
index 173e8d521..2bb130bd3 100644
--- a/README
+++ b/README
@@ -1,24 +1,38 @@
 Binary_c
 
-Binary-star evolution with nucleosynthesis
+The binary_c stellar population nucleosynthesis framework
+---------------------------------------------------------
 
 Websites:
         http://personal.ph.surrey.ac.uk/~ri0005/
         http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
         http://www.ast.cam.ac.uk/~rgi/
         http://www.ast.cam.ac.uk/~rgi/binary_c.html
-          
+
+Code on gitlab:
+        https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+
+Email lists:
+        https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+        https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ 
 Online interface:
-         http://www.ast.cam.ac.uk/~rgi/cgi-bin/binary5.cgi
-         (pending in Surrey)
+        http://www.ast.cam.ac.uk/~rgi/cgi-bin/binary5.cgi
+        http://personal.ph.surrey.ac.uk/~ri0005/cgi-bin/binary5.cgi
+
+Social media:
+        https://twitter.com/binary_c_code
+        https://www.facebook.com/groups/149489915089142/
 
 Contact:
-        Robert Izzard, 
+        Dr. Robert Izzard,
+        Department of Physics,
         University of Surrey,
         Guildford,
         United Kingdom
         
         r.izzard@surrey.ac.uk
+        rob.izzard@gmail.com
 
 Documentation is in the doc/ directory.
 
@@ -35,10 +49,10 @@ export LIBRARY_PATH=$LD_LIBRARY_PATH:newgslpath
 where "newgslpath" is the location of the libgsl.so shared library.
 If you cannot find libgsl.so (which may be libgsl.so.23 or similar) you cannot run binary_c.
 
-GSL can be found at 
-https://www.gnu.org/software/gsl/
+GSL can be found at https://www.gnu.org/software/gsl/
+
+but I keep a slightly modified version at
 
-but I keep a slightly modified version at 
 https://gitlab.eps.surrey.ac.uk/ri0005/GSL-RGI
 
 which you should use if you can. See the INSTALL.RGI file for 
diff --git a/configure b/configure
index 03fe0d60a..1ea388d13 100755
--- a/configure
+++ b/configure
@@ -1197,7 +1197,7 @@ sub make_version_numbers
  * Please do not change it by hand or add it to the SVN 
  * repository!
  */
-
+\#pragma once
 \#ifndef BINARY_C_VERSION_H
 \#define BINARY_C_VERSION_H
 
diff --git a/src/binary_c.h b/src/binary_c.h
index 847e854b7..74090ed67 100644
--- a/src/binary_c.h
+++ b/src/binary_c.h
@@ -2,10 +2,26 @@
 #ifndef BINARY_C_H
 #define BINARY_C_H
 
-
 /*
- * Header file to load in all macros, prototypes, etc.
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This Header file load in all macros, prototypes, etc.
  * for binary_c/nucsyn, and set a couple of global variables.
+ *
+ * It is the header file to be loaded if you are using the
+ * libbinary_c API. 
  */
 
 /* first : system headers */
diff --git a/src/binary_c_code_options.h b/src/binary_c_code_options.h
index ef9bd8f0e..1af3d25e6 100644
--- a/src/binary_c_code_options.h
+++ b/src/binary_c_code_options.h
@@ -2,6 +2,21 @@
 #ifndef BINARY_C_CODE_OPTIONS_H
 #define BINARY_C_CODE_OPTIONS_H
 /*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
  *
  * This file contains the code building options for binary_c
  *
diff --git a/src/binary_c_debug.h b/src/binary_c_debug.h
index 73ef5f8d3..fda8f2428 100644
--- a/src/binary_c_debug.h
+++ b/src/binary_c_debug.h
@@ -1,7 +1,23 @@
 #pragma once
 /*
- * Debugging for binary_c
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This file contains debugging information and macros.
  */
+
 #ifndef BINARY_C_DEBUG_H
 #define BINARY_C_DEBUG_H
 
diff --git a/src/binary_c_derivatives.h b/src/binary_c_derivatives.h
index 72ea5960b..dcf709add 100644
--- a/src/binary_c_derivatives.h
+++ b/src/binary_c_derivatives.h
@@ -1,15 +1,31 @@
 #pragma once
 #ifndef BINARY_C_DERIVATIVES_H
 #define BINARY_C_DERIVATIVES_H
-
-/* 
- * Macros labelling derivatives in binary_c
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file coantains macros labelling derivatives in binary_c,
+ * and function macros to calculate combinations of derivatives.
  */
 
-/* Stars */
+
+
 
 /* 
- * Mass loss and gain by stellar winds:
+ * Stellar mass loss and gain by winds:
+ *
  * The derivatives are of the "correct sign 
  * such that M(t+dt) = M(t) + dM/dt * dt
  * i.e.
diff --git a/src/binary_c_error_codes.h b/src/binary_c_error_codes.h
index d174cb6bd..27b35f985 100644
--- a/src/binary_c_error_codes.h
+++ b/src/binary_c_error_codes.h
@@ -1,9 +1,22 @@
 #pragma once
 #ifndef BINARY_C_ERROR_CODES_H
 #define BINARY_C_ERROR_CODES_H
-
 /*
- * Exit codes for binary_c : 
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains exit codes for binary_c : 
  * these should be integers <255 with 0 the normal exit.
  */
 #define BINARY_C_NORMAL_EXIT 0
diff --git a/src/binary_c_event_structures.h b/src/binary_c_event_structures.h
index e6c86c2e9..9aba3ebf8 100644
--- a/src/binary_c_event_structures.h
+++ b/src/binary_c_event_structures.h
@@ -2,6 +2,25 @@
 #ifndef BINARY_C_EVENT_STRUCTURES_H
 #define BINARY_C_EVENT_STRUCTURES_H
 
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains structures used by binary_c's
+ * event handling API.
+ */
+
 typedef unsigned int Event_notice;
 
 #define EVENT_HANDLER_ARGS                              \
diff --git a/src/binary_c_exit_macros.h b/src/binary_c_exit_macros.h
index 7d0fbe945..744fea103 100644
--- a/src/binary_c_exit_macros.h
+++ b/src/binary_c_exit_macros.h
@@ -1,6 +1,24 @@
 #pragma once
 #ifndef BINARY_C_EXIT_MACROS_H
 #define BINARY_C_EXIT_MACROS_H
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains the function macros used by binary_c
+ * to allow it to exit safely.
+ */
 
 #include <errno.h>
 
diff --git a/src/binary_c_exit_prototypes.h b/src/binary_c_exit_prototypes.h
index ca93c16d3..8c29aed74 100644
--- a/src/binary_c_exit_prototypes.h
+++ b/src/binary_c_exit_prototypes.h
@@ -1,7 +1,21 @@
 #include "binary_c_code_options.h"
-
 /*
- * Exit function prototypes
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This file contains the exit function prototypes.
  *
  * If you define __HAVE_STARDATA_T then the 
  * exit function with stardata is also included.
diff --git a/src/binary_c_function_macros.h b/src/binary_c_function_macros.h
index 87f52245d..2691b13e7 100644
--- a/src/binary_c_function_macros.h
+++ b/src/binary_c_function_macros.h
@@ -3,7 +3,23 @@
 #define BINARY_C_FUNCTION_MACROS_H
 
 /*
- * Function macros defined for binary_c
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This file contains the main group of function macros
+ * defined for binary_c.
  */
 
 #include "./events/events_function_macros.h"
diff --git a/src/binary_c_macros.h b/src/binary_c_macros.h
index 8ccdfa2b0..44a278bea 100644
--- a/src/binary_c_macros.h
+++ b/src/binary_c_macros.h
@@ -1,10 +1,28 @@
-/*
- * Macros used in binary_c/nucsyn
- */
 #pragma once
 #ifndef BINARY_MACROS_H
 #define BINARY_MACROS_H
 
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains most of the macros used in binary_c, 
+ * and loads in macros from many other header files. You
+ * should not include this file directly, include binary_c.h
+ * instead.
+ */
+
 #include "binary_c_code_options.h"
 #include "binary_c_debug.h"
 #include "binary_c_function_map.h"
diff --git a/src/binary_c_main.h b/src/binary_c_main.h
index 5ed45512e..a582e9626 100644
--- a/src/binary_c_main.h
+++ b/src/binary_c_main.h
@@ -2,6 +2,26 @@
 #ifndef BINARY_C_MAIN_H
 #define BINARY_C_MAIN_H
 
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This header file is used by the main() function 
+ * of binary_c (see main.c).
+ */
+
 
 #include "binary_c.h"
 #ifdef FPU_PRECISION
diff --git a/src/binary_c_main_macros.h b/src/binary_c_main_macros.h
index d7be479be..d87b94218 100644
--- a/src/binary_c_main_macros.h
+++ b/src/binary_c_main_macros.h
@@ -2,8 +2,24 @@
 
 #ifndef MAIN_MACROS_H
 #define MAIN_MACROS_H
+
+
 /*
- * Macros for binary_c's main function
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains macros used in binary_c's main() function.
  */
 
 
diff --git a/src/binary_c_maths.h b/src/binary_c_maths.h
index 97055fae4..b5bdfe38a 100644
--- a/src/binary_c_maths.h
+++ b/src/binary_c_maths.h
@@ -2,16 +2,30 @@
 #ifndef BINARY_MATHS_H
 #define BINARY_MATHS_H
 
-/* mathematics macros used in binary_c */
-/************************************************************/
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This file contains macros used in binary_c that are
+ * mathematical in nature.
+ */
 
 #include <math.h>
 #include <float.h>
 #include <stdarg.h>
 
-/* options */
-
-
 /*
  * If defined, allow monochecks in generic_bisect.
  */
diff --git a/src/binary_c_objects.h b/src/binary_c_objects.h
index 2a522defc..382368edb 100644
--- a/src/binary_c_objects.h
+++ b/src/binary_c_objects.h
@@ -4,9 +4,26 @@
 
 
 /*
- * Macros which, when defined, lead to the 
- * inclusion of the given object file in the
- * binary_c executable.
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ *
+ * This file contains macros which, when defined, lead to the 
+ * inclusion of a given object file in the
+ * binary_c executable. These files are usually built when
+ * the configure script is run, and contain data.
  *
  * The macro should be of the form:
  * 
diff --git a/src/binary_c_parameters.h b/src/binary_c_parameters.h
index f80a80dc7..249066cee 100644
--- a/src/binary_c_parameters.h
+++ b/src/binary_c_parameters.h
@@ -1,20 +1,32 @@
 #pragma once
 #ifndef BINARY_PARAMETERS_H
 #define BINARY_PARAMETERS_H
-
 /*
- * Header file containing the free parameters to be supplied to the rapid
- * binary star evolution code, binary_c.
- * 
- * Note : this is one of the first header files to be called. So it should
- * contain ONLY SETTINGS and no references to any other header files
- * except those which contain ONLY SETTINGS
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES
+ *
+ * This file contains the parameters which turn parts of the code
+ * on and off, as well as physical constants.
  */
 
+
+
+
+
 /*
- * binary_c_code_options.h contains the machine-specific and build-specific coding 
- * options, rather than options which should affect the behaviour of the code.
- * It should be read FIRST.
+ * binary_c_code_options.h contains the machine-specific and 
+ * build-specific coding options, rather than options which should
+ * affect the behaviour of the code. It should be read first.
  */
 #include "binary_c_code_options.h"
 
@@ -34,7 +46,6 @@
  * Stellar structure algorithms 
  *
  * Current choose one of BSE or BINT
- *
  ************************************************************/
 
 /*
@@ -43,6 +54,8 @@
 #define BSE
 
 /*
+ * Experimental:
+ *
  * Enable BINT stellar structure by interpolation.
  *
  * NB BINT and NUCSYN are incompatible at present. 
diff --git a/src/binary_c_physical_constants.h b/src/binary_c_physical_constants.h
index 067be7b3a..faf12924d 100644
--- a/src/binary_c_physical_constants.h
+++ b/src/binary_c_physical_constants.h
@@ -2,7 +2,27 @@
 #ifndef BINARY_C_PHYSICAL_CONSTANTS
 #define BINARY_C_PHYSICAL_CONSTANTS
 
-/** physical constants **/
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * This file contains physical constants.  Note that 
+ * constants should be derived whenever possible: for this reason
+ * only fundamental constants and a few measured constants are 
+ * given as numbers, the rest are combinations of the previously
+ * defined constants.
+ */
 #include "binary_c_maths.h"
 
 /*
diff --git a/src/binary_c_prototypes.h b/src/binary_c_prototypes.h
index aeecc9360..03227a72e 100644
--- a/src/binary_c_prototypes.h
+++ b/src/binary_c_prototypes.h
@@ -1,11 +1,27 @@
+#pragma once
+#ifndef BINARY_PROTOTYPES_H
+#define BINARY_PROTOTYPES_H
 
 /*
- * Header file to load in all the binary_c function
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * This header file loads in all the binary_c function
  * prototypes.
  */
-#pragma once
-#ifndef BINARY_PROTOTYPES_H
-#define BINARY_PROTOTYPES_H
+
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/binary_c_stellar_parameters.h b/src/binary_c_stellar_parameters.h
index d66ddd552..49e8a91c8 100644
--- a/src/binary_c_stellar_parameters.h
+++ b/src/binary_c_stellar_parameters.h
@@ -1,17 +1,31 @@
 /* Header file for the Binary Star Evolution Model */
 #pragma once
-/******************************************************************************/
-/******************************************************************************
+#ifndef STELLAR_PARAMETERS_H
+#define STELLAR_PARAMETERS_H
+
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * 
  * This file contains various parameters for identifying types of stars in the
  * log of the binary star evolution model.
  */
 
-
 /******************************************************************************/
 
 
-#ifndef STELLAR_PARAMETERS_H
-#define STELLAR_PARAMETERS_H
 
 
 /* Wolf-Rayet stars */
diff --git a/src/binary_c_stellar_types.h b/src/binary_c_stellar_types.h
index b25558442..bcc9007c6 100644
--- a/src/binary_c_stellar_types.h
+++ b/src/binary_c_stellar_types.h
@@ -1,19 +1,33 @@
 #pragma once
 #ifndef STELLAR_TYPES_H
 #define STELLAR_TYPES_H
-
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ * Stellar types for binary_c, based on the definitions of
+ * Hurley et al. "Evolution of Binary Stars and the
+ * Effect of Tides on Binary Populations", MNRAS 2002 and
+ * references therein.
+ *
+ * Also included are function macros for indentifying sets
+ * of stellar types.
+ */
 #include "binary_c_parameters.h" 
 #include "binary_c_macros.h"
 
 
-
-
-/*
- * Stellar types for binary_c, 
- * taken from Hurley et al. "Evolution of Binary Stars and the
- * Effect of Tides on Binary Populations", MNRAS 2002
- */
-
 #define LOW_MASS_MS 0
 #define LOW_MASS_MAIN_SEQUENCE 0
 #define MS 1
diff --git a/src/binary_c_string_macros.h b/src/binary_c_string_macros.h
index e86f794c3..70dd50e05 100644
--- a/src/binary_c_string_macros.h
+++ b/src/binary_c_string_macros.h
@@ -3,7 +3,23 @@
 #define STRING_MACROS_H
 
 /*
- * Macros to deal with macros as strings
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * In this file are macros to deal with macros as strings.
+ * These are used e.g. in the version() function.
  */
 
 
diff --git a/src/binary_c_structures.h b/src/binary_c_structures.h
index 8937eeeb7..3af4b9b1c 100644
--- a/src/binary_c_structures.h
+++ b/src/binary_c_structures.h
@@ -2,13 +2,33 @@
 #ifndef BINARY_STRUCTURES_H
 #define BINARY_STRUCTURES_H
 
-/* 
- * Header file containing the definitions of 
- * the memory structures used by binary_c/nucsyn
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ *
+ * This header file contains the definitions of 
+ * the memory structures used by binary_c/nucsyn, 
+ * so is where variables and their types are defined.
  * 
+ *
  * Please try to order structures efficently:
- * pack long items first (e.g. doubles and pointers), 
- * and short items at the end (e.g. ints and Booleans).
+ *
+ * 1) pack long items first (e.g. doubles and pointers), 
+ * 2) pack short items at the end (e.g. ints and Booleans).
+ *
  */
 #include <stdio.h>
 #include <setjmp.h>
diff --git a/src/binary_c_types.h b/src/binary_c_types.h
index a85c9079b..7432b74c9 100644
--- a/src/binary_c_types.h
+++ b/src/binary_c_types.h
@@ -3,7 +3,24 @@
 #define BINARY_C_TYPES_H
 
 /*
- * Variable typedefs and variable types used in binary_c 
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ *
+ * This file contains the variable types, as typedefs and macros,
+ * used in binary_c. 
  */
 
 
@@ -52,7 +69,7 @@ typedef unsigned int Boolean;
 
 /*
  * Other types can be changed ... 
- * but expect many function calls to break and binary_c if you do.
+ * but expect many function calls to break if you do.
  */
 #define __int__ int
 #define __double__ double
diff --git a/src/binary_c_unit_tests.h b/src/binary_c_unit_tests.h
index 69e389627..8956d9e9b 100644
--- a/src/binary_c_unit_tests.h
+++ b/src/binary_c_unit_tests.h
@@ -1,6 +1,21 @@
 #pragma once
 #ifndef BINARY_C_UNIT_TESTS_H
 #define BINARY_C_UNIT_TESTS_H
+/*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ */
 
 #include "binary_c_version_macros.h"
 /*
@@ -161,12 +176,12 @@
     BINARY_C_PRE_VERSION >= 28
 
 #define                                         \
-    STARS(X)                                    \
+    Stars(X)                                    \
     (stardata->star[0].X),                      \
     (stardata->star[1].X)
 
 #define \
-    RATIO(N,X,Y)                                                \
+    Stellar_property_ratio(N,X,Y)                                                \
     (                                                           \
         (Is_not_zero(stardata->star[(N)].Y))                    \
         ?                                                       \
@@ -175,22 +190,22 @@
         )
 
 #define \
-    STARS_RATIO(X,Y)                             \
-    RATIO(0,X,Y),                            \
-    RATIO(1,X,Y)
+    Stars_ratio(X,Y)                             \
+    Stellar_property_ratio(0,X,Y),                            \
+    Stellar_property_ratio(1,X,Y)
 
 #ifdef NUCSYN
 #define UNIT_TESTS_NUCSYN                       \
-    STARS(Xenv[XH1]),                           \
-        STARS(Xenv[XHe4]),                      \
-        STARS(Xenv[XC12]),                      \
-        STARS(Xenv[XC13]),                      \
-        STARS(Xenv[XN14]),                      \
-        STARS(Xenv[XO16]),                      \
-        STARS(Xenv[XNe20]),                     \
-        STARS(Xenv[XNa23]),                     \
-        STARS(Xenv[XMg24]),                     \
-        STARS(Xenv[XFe56])
+    Stars(Xenv[XH1]),                           \
+        Stars(Xenv[XHe4]),                      \
+        Stars(Xenv[XC12]),                      \
+        Stars(Xenv[XC13]),                      \
+        Stars(Xenv[XN14]),                      \
+        Stars(Xenv[XO16]),                      \
+        Stars(Xenv[XNe20]),                     \
+        Stars(Xenv[XNa23]),                     \
+        Stars(Xenv[XMg24]),                     \
+        Stars(Xenv[XFe56])
 #else
 /*
  * No nucsyn, set to undefined
@@ -202,24 +217,24 @@
 #define UNIT_TEST_time stardata->model.time
 #define UNIT_TEST_DATA                                                  \
     stardata->model.time,                                               \
-        STARS(mass),                                                    \
-        STARS(core_mass),                                               \
-        STARS(stellar_type),                                            \
+        Stars(mass),                                                    \
+        Stars(core_mass),                                               \
+        Stars(stellar_type),                                            \
         stardata->model.sgl,                                            \
-        STARS(radius),                                                  \
-        STARS(roche_radius),                                            \
-        STARS_RATIO(radius,roche_radius),                               \
-        STARS(age),                                                     \
-        STARS(epoch),                                                   \
-        STARS(luminosity),                                              \
-        STARS(angular_momentum),                                        \
-        STARS(omega),                                                   \
-        STARS(omega_crit),                                              \
-        STARS(vwind),                                                   \
-        STARS(stellar_timestep),                                        \
-        STARS(num_thermal_pulses),                                      \
-        STARS(tm),                                                      \
-        STARS(tn),                                                      \
+        Stars(radius),                                                  \
+        Stars(roche_radius),                                            \
+        Stars_ratio(radius,roche_radius),                               \
+        Stars(age),                                                     \
+        Stars(epoch),                                                   \
+        Stars(luminosity),                                              \
+        Stars(angular_momentum),                                        \
+        Stars(omega),                                                   \
+        Stars(omega_crit),                                              \
+        Stars(vwind),                                                   \
+        Stars(stellar_timestep),                                        \
+        Stars(num_thermal_pulses),                                      \
+        Stars(tm),                                                      \
+        Stars(tn),                                                      \
         stardata->model.dt,                                             \
         stardata->model.dtm,                                            \
         stardata->common.orbit.angular_momentum,                      \
@@ -241,25 +256,25 @@
         stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY_TIDES], \
         stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY_WINDS], \
         stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY_CBDISC], \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_WIND_LOSS]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_WIND_GAIN]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_RLOF_LOSS]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_RLOF_GAIN]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_NOVA]),                \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_NONCONSERVATIVE_LOSS]), \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_CBDISC_GAIN]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_DECRETION_DISC]),      \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_DISC_LOSS]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_LOSS]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_GAIN]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_LOSS]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_GAIN]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_NOVA]),              \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_NONCONSERVATIVE_LOSS]), \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_CBDISC_GAIN]),       \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_DECRETION_DISC]),    \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_TIDES]),              \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_MAGNETIC_BRAKING]),  \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_WIND_LOSS]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_WIND_GAIN]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_RLOF_LOSS]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_RLOF_GAIN]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_NOVA]),                \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_NONCONSERVATIVE_LOSS]), \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_CBDISC_GAIN]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_DECRETION_DISC]),      \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_DISC_LOSS]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_LOSS]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_GAIN]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_LOSS]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_GAIN]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_NOVA]),              \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_NONCONSERVATIVE_LOSS]), \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_CBDISC_GAIN]),       \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_DECRETION_DISC]),    \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_TIDES]),              \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_MAGNETIC_BRAKING]),  \
         UNIT_TESTS_NUCSYN,                                              \
         666.0
 
@@ -270,22 +285,22 @@
     BINARY_C_MINOR_VERSION >= 0 &&              \
     BINARY_C_PRE_VERSION == 27
 
-#define STARS(X)                                \
+#define Stars(X)                                \
     (stardata->star[0].X),                      \
         (stardata->star[1].X)
 
 #ifdef NUCSYN
 #define UNIT_TESTS_NUCSYN                       \
-    STARS(Xenv[XH1]),                           \
-        STARS(Xenv[XHe4]),                      \
-        STARS(Xenv[XC12]),                      \
-        STARS(Xenv[XC13]),                      \
-        STARS(Xenv[XN14]),                      \
-        STARS(Xenv[XO16]),                      \
-        STARS(Xenv[XNe20]),                     \
-        STARS(Xenv[XNa23]),                     \
-        STARS(Xenv[XMg24]),                     \
-        STARS(Xenv[XFe56])
+    Stars(Xenv[XH1]),                           \
+        Stars(Xenv[XHe4]),                      \
+        Stars(Xenv[XC12]),                      \
+        Stars(Xenv[XC13]),                      \
+        Stars(Xenv[XN14]),                      \
+        Stars(Xenv[XO16]),                      \
+        Stars(Xenv[XNe20]),                     \
+        Stars(Xenv[XNa23]),                     \
+        Stars(Xenv[XMg24]),                     \
+        Stars(Xenv[XFe56])
 #else
 /*
  * No nucsyn, set to undefined
@@ -296,24 +311,24 @@
 #define UNIT_TEST_time stardata->model.time
 #define UNIT_TEST_DATA                                                  \
     stardata->model.time,                                               \
-        STARS(mass),                                                    \
-        STARS(core_mass),                                               \
-        STARS(stellar_type),                                            \
+        Stars(mass),                                                    \
+        Stars(core_mass),                                               \
+        Stars(stellar_type),                                            \
         stardata->model.sgl,                                            \
-        STARS(radius),                                                  \
-        STARS(roche_radius),                                            \
-        STARS_RATIO(radius,roche_radius),                               \
-        STARS(age),                                                     \
-        STARS(epoch),                                                   \
-        STARS(luminosity),                                              \
-        STARS(angular_momentum),                                        \
-        STARS(omega),                                                   \
-        STARS(omega_crit),                                              \
-        STARS(vwind),                                                   \
-        STARS(dtmi),                                                    \
-        STARS(num_thermal_pulses),                                      \
-        STARS(tm),                                                      \
-        STARS(tn),                                                      \
+        Stars(radius),                                                  \
+        Stars(roche_radius),                                            \
+        Stars_ratio(radius,roche_radius),                               \
+        Stars(age),                                                     \
+        Stars(epoch),                                                   \
+        Stars(luminosity),                                              \
+        Stars(angular_momentum),                                        \
+        Stars(omega),                                                   \
+        Stars(omega_crit),                                              \
+        Stars(vwind),                                                   \
+        Stars(dtmi),                                                    \
+        Stars(num_thermal_pulses),                                      \
+        Stars(tm),                                                      \
+        Stars(tn),                                                      \
         stardata->model.dt,                                             \
         stardata->model.dtm,                                            \
         stardata->common.orbit.angular_momentum,                      \
@@ -335,25 +350,25 @@
         stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY_TIDES], \
         stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY_WINDS], \
         UNDEF,                                                    \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_WIND_LOSS]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_WIND_GAIN]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_RLOF_LOSS]),           \
-        STARS(derivative[DERIVATIVE_STELLAR_MASS_RLOF_GAIN]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_WIND_LOSS]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_WIND_GAIN]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_RLOF_LOSS]),           \
+        Stars(derivative[DERIVATIVE_STELLAR_MASS_RLOF_GAIN]),           \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_LOSS]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_GAIN]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_LOSS]),         \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_GAIN]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_LOSS]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_WIND_GAIN]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_LOSS]),         \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_RLOF_GAIN]),         \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
         UNDEF_STARS,                                                    \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_TIDES]),              \
-        STARS(derivative[DERIVATIVE_STELLAR_ANGMOM_MAGNETIC_BRAKING]),  \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_TIDES]),              \
+        Stars(derivative[DERIVATIVE_STELLAR_ANGMOM_MAGNETIC_BRAKING]),  \
         UNIT_TESTS_NUCSYN,                                              \
         666.0
 
@@ -369,7 +384,7 @@
 
 
 /*
- * Newer binary_c uses Printf for output, but if this 
+ * binary_c uses Printf for output, but if this 
  * is not defined instead use printf
  */
 #undef Printf
diff --git a/src/binary_c_version.h b/src/binary_c_version.h
index edccf05e0..27b161abd 100644
--- a/src/binary_c_version.h
+++ b/src/binary_c_version.h
@@ -4,9 +4,24 @@
 
 
 /*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
  * This file holds the version number for binary_c/nucsyn.
  *
- * BINARY_C_VERSION should have no spaces in it 
+ * Note: BINARY_C_VERSION should have no spaces in it 
  */
 #define BINARY_C_VERSION "2.1"
 
diff --git a/src/evolution/evolve_system.c b/src/evolution/evolve_system.c
index 2e1a4f412..a3ebe46e9 100644
--- a/src/evolution/evolve_system.c
+++ b/src/evolution/evolve_system.c
@@ -1,7 +1,22 @@
 #include "../binary_c.h"
 
 /*
- * Binary_c's main loop to evolve a binary system in time,
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ * Binary_c's main loop to evolve a binary system in time.
  */
 
 int evolve_system(struct stardata_t * RESTRICT const stardata)
diff --git a/src/main.c b/src/main.c
index 0dc515f8c..03b28c832 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,6 +2,22 @@
 
 
 /*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
+ *
  * main function for the binary_c code
  *
  * The code is in the src/... directories which are
diff --git a/src/main2.c b/src/main2.c
index c6fb0622e..b21bb65a0 100644
--- a/src/main2.c
+++ b/src/main2.c
@@ -1,13 +1,26 @@
+#include "binary_c.h"
 /*
+ * The binary_c stellar population nucleosynthesis framework.
+ *
+ * Contact: r.izzard@surrey.ac.uk or rob.izzard@gmail.com
+ *
+ * http://personal.ph.surrey.ac.uk/~ri0005/binary_c.html
+ * https://gitlab.eps.surrey.ac.uk/ri0005/binary_c
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-announce
+ * https://groups.google.com/forum/#!forum/binary_c-nucsyn-devel
+ * https://twitter.com/binary_c_code
+ * https://www.facebook.com/groups/149489915089142/
+ *
+ * Please see the files README, LICENCE and CHANGES,
+ * and the doc/ directory for documentation.
+ *
+ *
  * main2 : functions used in binary_c which 
  * don't really go elsewhere... often subserviant to 
  * the main() function, or system calls.
+ *
  */
 
-#include "binary_c.h"
-
-
-
 #ifdef RANDOM_SYSTEMS
 void set_random_system(struct stardata_t * const RESTRICT stardata)
 {
diff --git a/src/nucsyn/nucsyn_strip_and_mix.c b/src/nucsyn/nucsyn_strip_and_mix.c
index bd12d083f..9aad3c036 100644
--- a/src/nucsyn/nucsyn_strip_and_mix.c
+++ b/src/nucsyn/nucsyn_strip_and_mix.c
@@ -13,7 +13,7 @@
  *
  * Currently uses a table of H,He,C,N,O made by RI for
  * 0.8<M<20, 1e-4<Z<0.03 using the TWIN code, or a set
- * of tables for 0.5<M<20, 1e-4<Z<0.03 using the STARS code
+ * of tables for 0.5<M<20, 1e-4<Z<0.03 using the Stars code
  * made by Holly Preece. I recommend you use Holly's models.
  *
  * NB *Requires* RLOF_interpolation_method=0
@@ -37,7 +37,7 @@
 
 /*
  * Limit to the depth of mixing given by the set of models
- * computed by Holly Preece with the STARS code (15/06/2016).
+ * computed by Holly Preece with the Stars code (15/06/2016).
  */
 #define LIMIT_TO_1DUP_HOLLY_TABLE
 
diff --git a/src/opacity/opacity_STARS.c b/src/opacity/opacity_STARS.c
index 31a1ee0a2..5dfa20194 100644
--- a/src/opacity/opacity_STARS.c
+++ b/src/opacity/opacity_STARS.c
@@ -28,7 +28,7 @@ double opacity_STARS(Opacity_function_args_in)
         for(i=0;i<TABLE_OPACITY_STARS_LINES;i++)
         {
             int j;
-            printf("STARS %4d :",i);
+            printf("Stars %4d :",i);
             for(j=0;j<TABLE_OPACITY_STARS_NPARAMS+TABLE_OPACITY_STARS_NDATA;j++)
             {
                 printf("%g ",
diff --git a/src/tables/table_TAMS.h b/src/tables/table_TAMS.h
index 874225638..435b8be05 100644
--- a/src/tables/table_TAMS.h
+++ b/src/tables/table_TAMS.h
@@ -11,7 +11,7 @@
 #ifdef TAMS_SOURCE_HOLLY
 
 /*
- * Holly's models made with STARS
+ * Holly's models made with Stars
  */
 #include "../nucsyn/nucsyn_TAMS_Holly.h"
 #define TAMS_NDATA 5
-- 
GitLab