diff --git a/examples/main.c b/examples/main.c
index f7f9486779ac38953804c6a32cacf1bf866eabc1..ec42f514398ddcb7d3fbd29344903258100f91c9 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -91,7 +91,7 @@ void print_help_message(void) {
          "Execute a fixed number of time steps. When unset use the time_end "
          "parameter to stop.");
   printf("  %2s %14s %s\n", "-o", "{str}",
-	 "Generate a default output parameter file.");
+         "Generate a default output parameter file.");
   printf("  %2s %14s %s\n", "-P", "{sec:par:val}",
          "Set parameter value and overwrites values read from the parameters "
          "file. Can be used more than once.");
@@ -263,14 +263,14 @@ int main(int argc, char *argv[]) {
         }
         break;
       case 'o':
-	if (sscanf(optarg, "%s", output_parameters_filename) != 1) {
-	    if (myrank == 0) {
-	      printf("Error parsing output fields filename");
-	      print_help_message();
-	    }
-	    return 1;
-	}
-	break;
+        if (sscanf(optarg, "%s", output_parameters_filename) != 1) {
+          if (myrank == 0) {
+            printf("Error parsing output fields filename");
+            print_help_message();
+          }
+          return 1;
+        }
+        break;
       case 'P':
         cmdparams[nparams] = optarg;
         nparams++;
diff --git a/src/common_io.c b/src/common_io.c
index a059de9a77e9d7a4b4bdaf771b4c5798e8d67dc4..bb4c3eb9508848607719406dd5567069f3013d5f 100644
--- a/src/common_io.c
+++ b/src/common_io.c
@@ -887,8 +887,8 @@ void io_check_output_fields(const struct swift_params* params,
         }
       }
       if (!found)
-	message("WARNING: Unable to find field corresponding to %s in %s",
-		param_name, params->fileName);
+        message("WARNING: Unable to find field corresponding to %s in %s",
+                param_name, params->fileName);
     }
   }
 }
@@ -900,7 +900,7 @@ void io_check_output_fields(const struct swift_params* params,
  * @param filename The file to write
  */
 void io_write_output_field_parameter(const char* filename) {
-  FILE *file = fopen(filename, "w");
+  FILE* file = fopen(filename, "w");
 
   /* Loop over all particle types */
   fprintf(file, "SelectOutput:\n");
@@ -911,30 +911,28 @@ void io_write_output_field_parameter(const char* filename) {
     /* Write particle fields from the particle structure */
     switch (ptype) {
 
-    case swift_type_gas:
-      hydro_write_particles(NULL, NULL, list, &num_fields);
-      num_fields += chemistry_write_particles(NULL, list + num_fields);
-      break;
+      case swift_type_gas:
+        hydro_write_particles(NULL, NULL, list, &num_fields);
+        num_fields += chemistry_write_particles(NULL, list + num_fields);
+        break;
 
-    case swift_type_dark_matter:
-      darkmatter_write_particles(NULL, list, &num_fields);
-      break;
+      case swift_type_dark_matter:
+        darkmatter_write_particles(NULL, list, &num_fields);
+        break;
 
-    case swift_type_star:
-      star_write_particles(NULL, list, &num_fields);
-      break;
-    
+      case swift_type_star:
+        star_write_particles(NULL, list, &num_fields);
+        break;
     }
 
-    if (num_fields == 0)
-      continue;
+    if (num_fields == 0) continue;
 
     fprintf(file, "  # Particle Type %i\n", ptype);
     /* Write everything */
     for (int i = 0; i < num_fields; ++i) {
       fprintf(file, "  %s_%i: 1\n", list[i].name, ptype);
     }
-    
+
     fprintf(file, "\n");
   }
 
diff --git a/src/serial_io.c b/src/serial_io.c
index dfee945a7097c437e8af302659f1908967c9214f..5cae5ec4af35aaa966a170a6cd6bf796f708b4b8 100644
--- a/src/serial_io.c
+++ b/src/serial_io.c
@@ -1008,9 +1008,9 @@ void write_output_serial(struct engine* e, const char* baseName,
 
         /* Write everything */
         for (int i = 0; i < num_fields; ++i) {
-	  char field[256];
-	  sprintf(field, "SelectOutput:%s_%i", list[i].name, ptype);
-	  int should_write = parser_get_opt_param_int(params, field, 1);
+          char field[256];
+          sprintf(field, "SelectOutput:%s_%i", list[i].name, ptype);
+          int should_write = parser_get_opt_param_int(params, field, 1);
           if (should_write)
             writeArray(e, h_grp, fileName, xmfFile, partTypeGroupName, list[i],
                        Nparticles, N_total[ptype], mpi_rank, offset[ptype],