Start of cleanup of all ModuleEngines related code that was hurriedly changed for KSP 1.0
Start of cleanup of all ModuleEngines related code that was hurriedly changed for KSP 1.0

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,25 +1,3 @@
-1.0.17.0
-    Added: 'Mach Number' readout under the 'Surface' category and included it on the default surface HUD.
-    Added 'Thermal' readouts category including:
-        Internal Flux
-        Convection Flux
-        Radiation Flux
-        Critical Part Name
-        Critical Part Temperature
-        Critical Part Percentage of Max Temperature
-        Hottest Part Name
-        Hottest Part Temperature
-        Coldest Part Name
-        Coldest Part Temperature
-
-    Changed: Mach on the Build Engineer now accurate to 2 decimal places.
-    Changed: Max mach in the Build Engineer defaults to 1.00 even when no jet engines are present.
-    Changed: Increased eccentricity readout to 5 decimal places.  
-    Changed: Implemented Sarbian's object pooling. 
-    Fixed: Physically insignificant part mass is now associated with the parent part.
-    Fixed: Longitude and Latitude readouts now use a KER formatter instead of Squad's incorrect implementation.
-    Fixed: Possible null reference in the Rendezvous Processor.
-
 1.0.16.6, 02-05-15
     Fixed: Separately staged fairing mass jettisons are now calculated in the editor.
 

--- a/KerbalEngineer/Extensions/DoubleExtensions.cs
+++ b/KerbalEngineer/Extensions/DoubleExtensions.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -17,12 +17,18 @@
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 
 
+#region Using Directives
+
+using KerbalEngineer.Helpers;
+
+#endregion
+
 namespace KerbalEngineer.Extensions
 {
-    using Helpers;
-
     public static class DoubleExtensions
     {
+        #region Methods: public
+
         public static double Clamp(this double value, double lower, double higher)
         {
             return value < lower ? lower : value > higher ? higher : value;
@@ -43,19 +49,14 @@
             return Units.ToDistance(value);
         }
 
-        public static string ToFlux(this double value)
+        public static string ToTorque(this double value)
         {
-            return Units.ToFlux(value);
+            return Units.ToTorque(value);
         }
 
         public static string ToForce(this double value)
         {
             return Units.ToForce(value);
-        }
-
-        public static string ToMach(this double value)
-        {
-            return Units.ToMach(value);
         }
 
         public static string ToMass(this double value)
@@ -78,14 +79,6 @@
             return Units.ToSpeed(value);
         }
 
-        public static string ToTemperature(this double value)
-        {
-            return Units.ToTemperature(value);
-        }
-
-        public static string ToTorque(this double value)
-        {
-            return Units.ToTorque(value);
-        }
+        #endregion
     }
 }

--- a/KerbalEngineer/Extensions/FloatExtensions.cs
+++ b/KerbalEngineer/Extensions/FloatExtensions.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -17,12 +17,18 @@
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 
 
+#region Using Directives
+
+using KerbalEngineer.Helpers;
+
+#endregion
+
 namespace KerbalEngineer.Extensions
 {
-    using Helpers;
-
     public static class FloatExtensions
     {
+        #region Methods: public
+
         public static string ToAcceleration(this float value)
         {
             return Units.ToAcceleration(value);
@@ -38,19 +44,14 @@
             return Units.ToDistance(value);
         }
 
-        public static string ToFlux(this float value)
-        {
-            return Units.ToFlux(value);
-        }
-
         public static string ToForce(this float value)
         {
             return Units.ToForce(value);
         }
 
-        public static string ToMach(this float value)
+        public static string ToTorque(this float value)
         {
-            return Units.ToMach(value);
+            return Units.ToTorque(value);
         }
 
         public static string ToMass(this float value)
@@ -73,14 +74,6 @@
             return Units.ToSpeed(value);
         }
 
-        public static string ToTemperature(this float value)
-        {
-            return Units.ToTemperature(value);
-        }
-
-        public static string ToTorque(this float value)
-        {
-            return Units.ToTorque(value);
-        }
+        #endregion
     }
 }

--- a/KerbalEngineer/Extensions/PartExtensions.cs
+++ b/KerbalEngineer/Extensions/PartExtensions.cs
@@ -55,6 +55,7 @@
         /// <summary>
         ///     Gets whether the part has fuel.
         /// </summary>
+        /* not used
         public static bool EngineHasFuel(this Part part)
         {
             PartModule cachePartModule = GetModule<ModuleEngines>(part);
@@ -71,7 +72,7 @@
 
             return false;
         }
-
+        */
         /// <summary>
         ///     Gets the cost of the part excluding resources.
         /// </summary>
@@ -123,6 +124,7 @@
         /// <summary>
         ///     Gets the maximum thrust of the part if it's an engine.
         /// </summary>
+        /* not used
         public static double GetMaxThrust(this Part part)
         {
             PartModule cachePartModule = GetModule<ModuleEngines>(part);
@@ -139,6 +141,7 @@
 
             return 0.0;
         }
+        */
 
         /// <summary>
         ///     Gets the first typed PartModule in the part's module list.
@@ -221,13 +224,17 @@
         public static ModuleEnginesFX GetModuleMultiModeEngine(this Part part)
         {
             ModuleEnginesFX moduleEngineFx;
-            string mode = GetModule<MultiModeEngine>(part).mode;
-            for (int i = 0; i < part.Modules.Count; ++i)
-            {
-                moduleEngineFx = part.Modules[i] as ModuleEnginesFX;
-                if (moduleEngineFx != null && moduleEngineFx.engineID == mode)
-                {
-                    return moduleEngineFx;
+            MultiModeEngine multiMod = GetModule<MultiModeEngine>(part);
+            if (multiMod != null)
+            {
+                string mode = multiMod.mode;
+                for (int i = 0; i < part.Modules.Count; ++i)
+                {
+                    moduleEngineFx = part.Modules[i] as ModuleEnginesFX;
+                    if (moduleEngineFx != null && moduleEngineFx.engineID == mode)
+                    {
+                        return moduleEngineFx;
+                    }
                 }
             }
             return null;
@@ -343,6 +350,7 @@
         /// <summary>
         ///     Gets the current specific impulse for the engine.
         /// </summary>
+        /* not used
         public static double GetSpecificImpulse(this Part part, float atmosphere)
         {
             PartModule cachePartModule = GetModule<ModuleEngines>(part);
@@ -359,6 +367,7 @@
 
             return 0.0;
         }
+        */
 
         /// <summary>
         ///     Gets the total mass of the part including resources.
@@ -588,6 +597,12 @@
             }
         }
 
+        // This needs updating to handle multi-mode engines and engines with multiple ModuleEngines correctly.
+        // It currently just shows the stats of the currently active module for multi-mode engines and just 
+        // the first ModuleEngines for engines with multiple modules.
+        // It should really show all the modes for multi-mode engines as separate sections.
+        // For other engines with multiple ModuleEngines it should combine the separate modules into a single set of data
+        // The constructor should be changed to take the Part itself.  It can be called if HasModule<ModuleEngines>() is true.
         public class ProtoModuleEngine
         {
             private readonly PartModule module;
@@ -627,19 +642,6 @@
                 MinimumThrust = engine.minThrust;
                 Propellants = engine.propellants;
             }
-
-            private void SetModuleEnginesFx()
-            {
-                ModuleEnginesFX engine = module as ModuleEnginesFX;
-                if (engine == null)
-                {
-                    return;
-                }
-
-                MaximumThrust = engine.maxThrust * (engine.thrustPercentage * 0.01);
-                MinimumThrust = engine.minThrust;
-                Propellants = engine.propellants;
-            }
         }
     }
 }

--- a/KerbalEngineer/Extensions/StringExtensions.cs
+++ /dev/null
@@ -1,33 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Extensions
-{
-    public static class StringExtensions
-    {
-        public static string ToLength(this string value, int length)
-        {
-            if (value != null && value.Length > length)
-            {
-                value = value.Substring(0, length) + "...";
-            }
-            return value;
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/ReadoutLibrary.cs
+++ b/KerbalEngineer/Flight/Readouts/ReadoutLibrary.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 namespace KerbalEngineer.Flight.Readouts
 {
+    #region Using Directives
+
     using System;
     using System.Collections.Generic;
     using System.Linq;
@@ -28,7 +30,6 @@
     using Rendezvous;
     using Settings;
     using Surface;
-    using Thermal;
     using Vessel;
     using AltitudeSeaLevel = Surface.AltitudeSeaLevel;
     using ApoapsisHeight = Orbital.ApoapsisHeight;
@@ -39,9 +40,17 @@
     using TimeToApoapsis = Orbital.TimeToApoapsis;
     using TimeToPeriapsis = Orbital.TimeToPeriapsis;
 
+    #endregion
+
     public static class ReadoutLibrary
     {
+        #region Fields
+
         private static List<ReadoutModule> readouts = new List<ReadoutModule>();
+
+        #endregion
+
+        #region Constructors
 
         /// <summary>
         ///     Sets up and populates the readout library with the stock readouts.
@@ -54,7 +63,6 @@
                 ReadoutCategory.SetCategory("Surface", "Surface and atmospheric readouts.");
                 ReadoutCategory.SetCategory("Vessel", "Vessel performance statistics.");
                 ReadoutCategory.SetCategory("Rendezvous", "Readouts for rendezvous manovoeures.");
-                ReadoutCategory.SetCategory("Thermal", "Thermal characteristics readouts.");
                 ReadoutCategory.SetCategory("Miscellaneous", "Miscellaneous readouts.");
                 ReadoutCategory.Selected = ReadoutCategory.GetCategory("Orbital");
 
@@ -101,7 +109,6 @@
                 readouts.Add(new VerticalAcceleration());
                 readouts.Add(new HorizontalSpeed());
                 readouts.Add(new HorizontalAcceleration());
-                readouts.Add(new MachNumber());
                 readouts.Add(new Latitude());
                 readouts.Add(new Longitude());
                 readouts.Add(new GeeForce());
@@ -164,19 +171,7 @@
                 readouts.Add(new Rendezvous.OrbitalPeriod());
                 readouts.Add(new Rendezvous.SemiMajorAxis());
                 readouts.Add(new Rendezvous.SemiMinorAxis());
-
-                // Thermal
-                readouts.Add(new InternalFlux());
-                readouts.Add(new ConvectionFlux());
-                readouts.Add(new RadiationFlux());
-                readouts.Add(new CriticalPart());
-                readouts.Add(new CriticalTemperature());
-                readouts.Add(new CriticalPercentage());
-                readouts.Add(new HottestPart());
-                readouts.Add(new HottestTemperature());
-                readouts.Add(new CoolestPart());
-                readouts.Add(new CoolestTemperature());
-
+                
                 // Misc
                 readouts.Add(new Separator());
                 readouts.Add(new GuiSizeAdjustor());
@@ -193,20 +188,22 @@
             }
         }
 
+        #endregion
+
+        #region Properties
+
         /// <summary>
         ///     Gets and sets the available readout modules.
         /// </summary>
         public static List<ReadoutModule> Readouts
         {
-            get
-            {
-                return readouts;
-            }
-            set
-            {
-                readouts = value;
-            }
-        }
+            get { return readouts; }
+            set { readouts = value; }
+        }
+
+        #endregion
+
+        #region Methods
 
         /// <summary>
         ///     Gets a list of readout modules which are associated with the specified category.
@@ -229,7 +226,7 @@
         /// </summary>
         public static void Reset()
         {
-            foreach (ReadoutModule readout in readouts)
+            foreach (var readout in readouts)
             {
                 readout.Reset();
             }
@@ -242,8 +239,8 @@
         {
             try
             {
-                SettingHandler handler = SettingHandler.Load("HelpStrings.xml");
-                foreach (ReadoutModule readout in readouts)
+                var handler = SettingHandler.Load("HelpStrings.xml");
+                foreach (var readout in readouts)
                 {
                     readout.HelpString = handler.GetSet(readout.Category + "." + readout.GetType().Name, readout.HelpString);
                 }
@@ -254,5 +251,7 @@
                 Logger.Exception(ex);
             }
         }
+
+        #endregion
     }
 }

--- a/KerbalEngineer/Flight/Readouts/ReadoutModule.cs
+++ b/KerbalEngineer/Flight/Readouts/ReadoutModule.cs
@@ -29,8 +29,6 @@
 
 namespace KerbalEngineer.Flight.Readouts
 {
-    using Extensions;
-
     public abstract class ReadoutModule
     {
         #region Fields
@@ -180,13 +178,13 @@
             {
                 GUILayout.Label(this.Name, this.NameStyle);
                 GUILayout.FlexibleSpace();
-                GUILayout.Label(value.ToLength(20), this.ValueStyle);
+                GUILayout.Label(value, this.ValueStyle);
             }
             else
             {
                 GUILayout.Label(this.Name, this.NameStyle, GUILayout.Height(this.NameStyle.fontSize * 1.2f));
                 GUILayout.FlexibleSpace();
-                GUILayout.Label(value.ToLength(20), this.ValueStyle, GUILayout.Height(this.ValueStyle.fontSize * 1.2f));
+                GUILayout.Label(value, this.ValueStyle, GUILayout.Height(this.ValueStyle.fontSize * 1.2f));
             }
             GUILayout.EndHorizontal();
 
@@ -200,13 +198,13 @@
             {
                 GUILayout.Label(name, this.NameStyle);
                 GUILayout.FlexibleSpace();
-                GUILayout.Label(value.ToLength(20), this.ValueStyle);
+                GUILayout.Label(value, this.ValueStyle);
             }
             else
             {
                 GUILayout.Label(name, this.NameStyle, GUILayout.Height(this.NameStyle.fontSize * 1.2f));
                 GUILayout.FlexibleSpace();
-                GUILayout.Label(value.ToLength(20), this.ValueStyle, GUILayout.Height(this.ValueStyle.fontSize * 1.2f));
+                GUILayout.Label(value, this.ValueStyle, GUILayout.Height(this.ValueStyle.fontSize * 1.2f));
             }
             GUILayout.EndHorizontal();
 

--- a/KerbalEngineer/Flight/Readouts/Surface/AtmosphericEfficiency.cs
+++ b/KerbalEngineer/Flight/Readouts/Surface/AtmosphericEfficiency.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -17,26 +17,36 @@
 //     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // 
 
+#region Using Directives
+
+using KerbalEngineer.Extensions;
+using KerbalEngineer.Flight.Sections;
+
+#endregion
+
 namespace KerbalEngineer.Flight.Readouts.Surface
 {
-    using Extensions;
-    using Sections;
-
     public class AtmosphericEfficiency : ReadoutModule
     {
+        #region Constructors
+
         public AtmosphericEfficiency()
         {
-            Name = "Atmos. Efficiency";
-            Category = ReadoutCategory.GetCategory("Surface");
-            HelpString = "Shows you vessel's efficiency as a ratio of the current velocity and terminal velocity.  Less than 100% means that you are losing efficiency due to gravity and greater than 100% is due to drag.";
-            IsDefault = false;
+            this.Name = "Atmos. Efficiency";
+            this.Category = ReadoutCategory.GetCategory("Surface");
+            this.HelpString = "Shows you vessel's efficiency as a ratio of the current velocity and terminal velocity.  Less than 1 means that you are losing efficiency due to gravity and greater than 1 is due to drag.";
+            this.IsDefault = true;
         }
+
+        #endregion
+
+        #region Methods: public
 
         public override void Draw(SectionModule section)
         {
             if (AtmosphericProcessor.ShowDetails)
             {
-                DrawLine(AtmosphericProcessor.Efficiency.ToPercent(), section.IsHud);
+                this.DrawLine(AtmosphericProcessor.Efficiency.ToPercent(), section.IsHud);
             }
         }
 
@@ -49,5 +59,7 @@
         {
             AtmosphericProcessor.RequestUpdate();
         }
+
+        #endregion
     }
 }

--- a/KerbalEngineer/Flight/Readouts/Surface/MachNumber.cs
+++ /dev/null
@@ -1,43 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Surface
-{
-    using Extensions;
-    using Sections;
-
-    public class MachNumber : ReadoutModule
-    {
-        public MachNumber()
-        {
-            Name = "Mach Number";
-            Category = ReadoutCategory.GetCategory("Surface");
-            HelpString = "Shows the vessel's mach number.";
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (FlightGlobals.ActiveVessel.atmDensity > 0.0)
-            {
-                DrawLine(FlightGlobals.ActiveVessel.mach.ToMach(), section.IsHud);
-            }
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/ConvectionFlux.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Extensions;
-    using Sections;
-
-    public class ConvectionFlux : ReadoutModule
-    {
-        public ConvectionFlux()
-        {
-            Name = "Convection Flux";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails && FlightGlobals.ActiveVessel.atmDensity > 0.0)
-            {
-                DrawLine(ThermalProcessor.ConvectionFlux.ToFlux(), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/CoolestPart.cs
+++ /dev/null
@@ -1,52 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Sections;
-
-    public class CoolestPart : ReadoutModule
-    {
-        public CoolestPart()
-        {
-            Name = "Coolest Part";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.CoolestPartName, section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/CoolestTemperature.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Helpers;
-    using Sections;
-
-    public class CoolestTemperature : ReadoutModule
-    {
-        public CoolestTemperature()
-        {
-            Name = "Coolest Temperature";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(Units.ToTemperature(ThermalProcessor.CoolestTemperature, ThermalProcessor.CoolestTemperatureMax), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/CriticalPart.cs
+++ /dev/null
@@ -1,52 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Sections;
-
-    public class CriticalPart : ReadoutModule
-    {
-        public CriticalPart()
-        {
-            Name = "Critical Part";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.CriticalPartName, section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/CriticalPercentage.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Extensions;
-    using Sections;
-
-    public class CriticalPercentage : ReadoutModule
-    {
-        public CriticalPercentage()
-        {
-            Name = "Critical Percentage";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.CriticalTemperaturePercentage.ToPercent(), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/CriticalTemperature.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Helpers;
-    using Sections;
-
-    public class CriticalTemperature : ReadoutModule
-    {
-        public CriticalTemperature()
-        {
-            Name = "Critical Temperature";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(Units.ToTemperature(ThermalProcessor.CriticalTemperature, ThermalProcessor.CriticalTemperatureMax), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/HottestPart.cs
+++ /dev/null
@@ -1,52 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Sections;
-
-    public class HottestPart : ReadoutModule
-    {
-        public HottestPart()
-        {
-            Name = "Hottest Part";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.HottestPartName, section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/HottestTemperature.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Helpers;
-    using Sections;
-
-    public class HottestTemperature : ReadoutModule
-    {
-        public HottestTemperature()
-        {
-            Name = "Hottest Temperature";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(Units.ToTemperature(ThermalProcessor.HottestTemperature, ThermalProcessor.HottestTemperatureMax), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/InternalFlux.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Extensions;
-    using Sections;
-
-    public class InternalFlux : ReadoutModule
-    {
-        public InternalFlux()
-        {
-            Name = "Internal Flux";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.InternalFlux.ToFlux(), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/RadiationFlux.cs
+++ /dev/null
@@ -1,53 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    using Extensions;
-    using Sections;
-
-    public class RadiationFlux : ReadoutModule
-    {
-        public RadiationFlux()
-        {
-            Name = "Radiation Flux";
-            Category = ReadoutCategory.GetCategory("Thermal");
-            HelpString = string.Empty;
-            IsDefault = true;
-        }
-
-        public override void Draw(SectionModule section)
-        {
-            if (ThermalProcessor.ShowDetails)
-            {
-                DrawLine(ThermalProcessor.RadiationFlux.ToFlux(), section.IsHud);
-            }
-        }
-
-        public override void Reset()
-        {
-            FlightEngineerCore.Instance.AddUpdatable(ThermalProcessor.Instance);
-        }
-
-        public override void Update()
-        {
-            ThermalProcessor.RequestUpdate();
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Readouts/Thermal/ThermalProcessor.cs
+++ /dev/null
@@ -1,132 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2015 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-namespace KerbalEngineer.Flight.Readouts.Thermal
-{
-    public class ThermalProcessor : IUpdatable, IUpdateRequest
-    {
-        private static readonly ThermalProcessor instance = new ThermalProcessor();
-
-        static ThermalProcessor()
-        {
-            HottestTemperature = 0.0;
-            HottestTemperatureMax = 0.0;
-            CoolestTemperature = 0.0;
-            CoolestTemperatureMax = 0.0;
-            CriticalTemperature = 0.0;
-            CriticalTemperatureMax = 0.0;
-            HottestPartName = string.Empty;
-            CoolestPartName = string.Empty;
-            CriticalPartName = string.Empty;
-        }
-
-        public static double ConvectionFlux { get; private set; }
-
-        public static string CoolestPartName { get; private set; }
-
-        public static double CoolestTemperature { get; private set; }
-
-        public static double CoolestTemperatureMax { get; private set; }
-
-        public static string CriticalPartName { get; private set; }
-
-        public static double CriticalTemperature { get; private set; }
-
-        public static double CriticalTemperatureMax { get; private set; }
-
-        public static double CriticalTemperaturePercentage { get; private set; }
-
-        public static string HottestPartName { get; private set; }
-
-        public static double HottestTemperature { get; private set; }
-
-        public static double HottestTemperatureMax { get; private set; }
-
-        public static ThermalProcessor Instance
-        {
-            get
-            {
-                return instance;
-            }
-        }
-
-        public static double InternalFlux { get; private set; }
-
-        public static double RadiationFlux { get; private set; }
-        public static bool ShowDetails { get; private set; }
-
-        public bool UpdateRequested { get; set; }
-
-        public static void RequestUpdate()
-        {
-            instance.UpdateRequested = true;
-        }
-
-        public void Update()
-        {
-            if (FlightGlobals.ActiveVessel.parts.Count == 0)
-            {
-                ShowDetails = false;
-                return;
-            }
-
-            ShowDetails = true;
-
-            ConvectionFlux = 0.0;
-            RadiationFlux = 0.0;
-            InternalFlux = 0.0;
-            HottestTemperature = 0.0;
-            CoolestTemperature = double.MaxValue;
-            CriticalTemperature = double.MaxValue;
-            CriticalTemperaturePercentage = 0.0;
-            HottestPartName = string.Empty;
-            CoolestPartName = string.Empty;
-            CriticalPartName = string.Empty;
-
-            for (int i = 0; i < FlightGlobals.ActiveVessel.parts.Count; ++i)
-            {
-                Part part = FlightGlobals.ActiveVessel.parts[i];
-
-                ConvectionFlux = ConvectionFlux + part.thermalConvectionFlux;
-                RadiationFlux = RadiationFlux + part.thermalRadiationFlux;
-                InternalFlux = InternalFlux + part.thermalInternalFluxPrevious;
-
-                if (part.temperature > HottestTemperature)
-                {
-                    HottestTemperature = part.temperature;
-                    HottestTemperatureMax = part.maxTemp;
-                    HottestPartName = part.partInfo.title;
-                }
-                if (part.temperature < CoolestTemperature)
-                {
-                    CoolestTemperature = part.temperature;
-                    CoolestTemperatureMax = part.maxTemp;
-                    CoolestPartName = part.partInfo.title;
-                }
-                if (part.temperature / part.maxTemp > CriticalTemperaturePercentage)
-                {
-                    CriticalTemperature = part.temperature;
-                    CriticalTemperatureMax = part.maxTemp;
-                    CriticalTemperaturePercentage = part.temperature / part.maxTemp;
-                    CriticalPartName = part.partInfo.title;
-                }
-            }
-        }
-    }
-}

--- a/KerbalEngineer/Flight/Sections/SectionLibrary.cs
+++ b/KerbalEngineer/Flight/Sections/SectionLibrary.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -19,19 +19,22 @@
 
 #region Using Directives
 
+using System.Collections.Generic;
+using System.Linq;
+
+using KerbalEngineer.Flight.Readouts;
+using KerbalEngineer.Settings;
+
+using UnityEngine;
+
 #endregion
 
 namespace KerbalEngineer.Flight.Sections
 {
-    using System.Collections.Generic;
-    using System.Linq;
-    using Readouts;
-    using Settings;
-    using UnityEngine;
-
     public static class SectionLibrary
     {
         #region Constructors
+
         /// <summary>
         ///     Sets up and populates the library with the stock sections on creation.
         /// </summary>
@@ -68,14 +71,7 @@
                 ReadoutModules = ReadoutLibrary.GetCategory(ReadoutCategory.GetCategory("Rendezvous")).Where(r => r.IsDefault).ToList()
             });
 
-            CustomSections.Add(new SectionModule
-            {
-                Name = "THERMAL",
-                Abbreviation = "HEAT",
-                ReadoutModules = ReadoutLibrary.GetCategory(ReadoutCategory.GetCategory("Thermal")).Where(r => r.IsDefault).ToList()
-            });
-
-            SectionModule hud1 = new SectionModule
+            var hud1 = new SectionModule
             {
                 Name = "HUD 1",
                 Abbreviation = "HUD 1",
@@ -94,7 +90,7 @@
             hud1.IsHud = true;
             CustomSections.Add(hud1);
 
-            SectionModule hud2 = new SectionModule
+            var hud2 = new SectionModule
             {
                 Name = "HUD 2",
                 Abbreviation = "HUD 2",
@@ -105,8 +101,7 @@
                     ReadoutLibrary.GetReadout("AltitudeTerrain"),
                     ReadoutLibrary.GetReadout("VerticalSpeed"),
                     ReadoutLibrary.GetReadout("HorizontalSpeed"),
-                    ReadoutLibrary.GetReadout("Biome"),
-                    ReadoutLibrary.GetReadout("MachNumber")
+                    ReadoutLibrary.GetReadout("Biome")
                 },
             };
             hud2.FloatingPositionX = Screen.width * 0.75f - (hud2.ReadoutModules.First().ContentWidth * 0.5f);
@@ -114,9 +109,11 @@
             hud2.IsHud = true;
             CustomSections.Add(hud2);
         }
+
         #endregion
 
         #region Properties
+
         /// <summary>
         ///     Gets and sets a list of custom sections.
         /// </summary>
@@ -136,11 +133,13 @@
         ///     Gets and sets a list of stock sections
         /// </summary>
         public static List<SectionModule> StockSections { get; set; }
+
         #endregion
 
         #region Updating
 
         #region Methods: public
+
         /// <summary>
         ///     Fixed update all of the sections.
         /// </summary>
@@ -161,15 +160,17 @@
             UpdateSections(StockSections);
             UpdateSections(CustomSections);
         }
+
         #endregion
 
         #region Methods: private
+
         /// <summary>
         ///     Fixed updates a list of sections.
         /// </summary>
         private static void FixedUpdateSections(IEnumerable<SectionModule> sections)
         {
-            foreach (SectionModule section in sections)
+            foreach (var section in sections)
             {
                 if (section.IsVisible)
                 {
@@ -183,13 +184,13 @@
         /// </summary>
         private static void UpdateSections(IEnumerable<SectionModule> sections)
         {
-            foreach (SectionModule section in sections)
+            foreach (var section in sections)
             {
                 if (section.IsVisible)
                 {
                     if (!section.IsFloating)
                     {
-                        foreach (ReadoutModule readout in section.ReadoutModules)
+                        foreach (var readout in section.ReadoutModules)
                         {
                             if (readout.ResizeRequested)
                             {
@@ -202,7 +203,7 @@
                     }
                     else
                     {
-                        foreach (ReadoutModule readout in section.ReadoutModules)
+                        foreach (var readout in section.ReadoutModules)
                         {
                             if (readout.ResizeRequested)
                             {
@@ -217,11 +218,13 @@
                 NumberOfSections++;
             }
         }
+
         #endregion
 
         #endregion
 
         #region Saving and Loading
+
         /// <summary>
         ///     Loads the state of all stored sections.
         /// </summary>
@@ -240,11 +243,11 @@
                 }
             });
 
-            SettingHandler handler = SettingHandler.Load("SectionLibrary.xml", new[] { typeof(List<SectionModule>) });
+            var handler = SettingHandler.Load("SectionLibrary.xml", new[] {typeof(List<SectionModule>)});
             StockSections = handler.Get("StockSections", StockSections);
             CustomSections = handler.Get("CustomSections", CustomSections);
 
-            foreach (SectionModule section in GetAllSections())
+            foreach (var section in GetAllSections())
             {
                 section.ClearNullReadouts();
             }
@@ -255,20 +258,22 @@
         /// </summary>
         public static void Save()
         {
-            SettingHandler handler = new SettingHandler();
+            var handler = new SettingHandler();
             handler.Set("StockSections", StockSections);
             handler.Set("CustomSections", CustomSections);
             handler.Save("SectionLibrary.xml");
         }
+
         #endregion
 
         #region Methods
+
         /// <summary>
         ///     Gets a list containing all section modules.
         /// </summary>
         public static List<SectionModule> GetAllSections()
         {
-            List<SectionModule> sections = new List<SectionModule>();
+            var sections = new List<SectionModule>();
             sections.AddRange(StockSections);
             sections.AddRange(CustomSections);
             return sections;
@@ -321,6 +326,7 @@
         {
             return StockSections.Remove(GetStockSection(name));
         }
+
         #endregion
     }
 }

--- a/KerbalEngineer/Helpers/Units.cs
+++ b/KerbalEngineer/Helpers/Units.cs
@@ -1,7 +1,7 @@
 // 
 //     Kerbal Engineer Redux
 // 
-//     Copyright (C) 2015 CYBUTEK
+//     Copyright (C) 2014 CYBUTEK
 // 
 //     This program is free software: you can redistribute it and/or modify
 //     it under the terms of the GNU General Public License as published by
@@ -19,10 +19,14 @@
 
 namespace KerbalEngineer.Helpers
 {
+    #region Using Directives
     using System;
+
+    #endregion
 
     public static class Units
     {
+        #region Methods
         public const double GRAVITY = 9.80665;
 
         public static string Concat(int value1, int value2)
@@ -91,7 +95,7 @@
             int min = (int)Math.Floor(rem * 60);
             rem -= ((double)min / 60);
             int sec = (int)Math.Floor(rem * 3600);
-            return String.Format("{0:0}° {1:00}' {2:00}\"", deg, min, sec);
+            return String.Format("{0:0}° {1:00}' {2:00}\"", deg, min, sec); 
         }
 
         public static string ToDistance(double value, int decimals = 1)
@@ -123,11 +127,6 @@
             return value.ToString("N" + decimals) + "Mm";
         }
 
-        public static string ToFlux(double value)
-        {
-            return value.ToString("#,0.00") + "W";
-        }
-
         public static string ToForce(double value)
         {
             return value.ToString((value < 100000.0) ? (value < 10000.0) ? (value < 100.0) ? (Math.Abs(value) < Double.Epsilon) ? "N0" : "N3" : "N2" : "N1" : "N0") + "kN";
@@ -138,11 +137,6 @@
             string format1 = (value1 < 100000.0) ? (value1 < 10000.0) ? (value1 < 100.0) ? (Math.Abs(value1) < Double.Epsilon) ? "N0" : "N3" : "N2" : "N1" : "N0";
             string format2 = (value2 < 100000.0) ? (value2 < 10000.0) ? (value2 < 100.0) ? (Math.Abs(value2) < Double.Epsilon) ? "N0" : "N3" : "N2" : "N1" : "N0";
             return value1.ToString(format1) + " / " + value2.ToString(format2) + "kN";
-        }
-
-        public static string ToMach(double value)
-        {
-            return value.ToString("0.00") + "Ma";
         }
 
         public static string ToMass(double value, int decimals = 0)
@@ -188,16 +182,6 @@
             return value.ToString("N" + decimals) + "m/s";
         }
 
-        public static string ToTemperature(double value)
-        {
-            return value.ToString("#,0") + "K";
-        }
-
-        public static string ToTemperature(double value1, double value2)
-        {
-            return value1.ToString("#,0") + " / " + value2.ToString("#,0") + "K";
-        }
-
         public static string ToTime(double value)
         {
             return TimeFormatter.ConvertToString(value);
@@ -207,5 +191,6 @@
         {
             return value.ToString((value < 100.0) ? (Math.Abs(value) < Double.Epsilon) ? "N0" : "N1" : "N0") + "kNm";
         }
+        #endregion
     }
 }

--- a/KerbalEngineer/KerbalEngineer.csproj
+++ b/KerbalEngineer/KerbalEngineer.csproj
@@ -48,7 +48,6 @@
     <Compile Include="Editor\ResourceInfoItem.cs" />
     <Compile Include="Extensions\FloatExtensions.cs" />
     <Compile Include="Extensions\OrbitExtensions.cs" />
-    <Compile Include="Extensions\StringExtensions.cs" />
     <Compile Include="Flight\ActionMenuGui.cs" />
     <Compile Include="Flight\Presets\Preset.cs" />
     <Compile Include="Flight\Readouts\Miscellaneous\SystemTime.cs" />
@@ -90,18 +89,6 @@
     <Compile Include="Flight\Readouts\Surface\Biome.cs" />
     <Compile Include="Flight\Readouts\Surface\HorizontalAcceleration.cs" />
     <Compile Include="Flight\Readouts\Surface\VerticalAcceleration.cs" />
-    <Compile Include="Flight\Readouts\Surface\MachNumber.cs" />
-    <Compile Include="Flight\Readouts\Thermal\CriticalPart.cs" />
-    <Compile Include="Flight\Readouts\Thermal\CoolestPart.cs" />
-    <Compile Include="Flight\Readouts\Thermal\CoolestTemperature.cs" />
-    <Compile Include="Flight\Readouts\Thermal\CriticalPercentage.cs" />
-    <Compile Include="Flight\Readouts\Thermal\CriticalTemperature.cs" />
-    <Compile Include="Flight\Readouts\Thermal\InternalFlux.cs" />
-    <Compile Include="Flight\Readouts\Thermal\RadiationFlux.cs" />
-    <Compile Include="Flight\Readouts\Thermal\ConvectionFlux.cs" />
-    <Compile Include="Flight\Readouts\Thermal\HottestTemperature.cs" />
-    <Compile Include="Flight\Readouts\Thermal\HottestPart.cs" />
-    <Compile Include="Flight\Readouts\Thermal\ThermalProcessor.cs" />
     <Compile Include="Flight\Readouts\Vessel\AttitudeProcessor.cs" />
     <Compile Include="Flight\Readouts\Vessel\DeltaVCurrentTotal.cs" />
     <Compile Include="Flight\Readouts\Vessel\PitchRate.cs" />
@@ -222,7 +209,6 @@
   <ItemGroup>
     <Reference Include="Assembly-CSharp">
       <HintPath>..\Game\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
-      <Private>False</Private>
     </Reference>
     <Reference Include="System">
       <HintPath>..\Game\KSP_Data\Managed\System.dll</HintPath>
@@ -234,7 +220,6 @@
     </Reference>
     <Reference Include="UnityEngine">
       <HintPath>..\Game\KSP_Data\Managed\UnityEngine.dll</HintPath>
-      <Private>False</Private>
     </Reference>
   </ItemGroup>
   <ItemGroup />

--- a/KerbalEngineer/VesselSimulator/EngineSim.cs
+++ b/KerbalEngineer/VesselSimulator/EngineSim.cs
@@ -31,6 +31,7 @@
         private static readonly Pool<EngineSim> pool = new Pool<EngineSim>(Create, Reset);
 
         private readonly ResourceContainer resourceConsumptions = new ResourceContainer();
+        private readonly ResourceContainer resourceFlowModes = new ResourceContainer();
 
         public double actualThrust = 0;
         public bool isActive = false;
@@ -52,6 +53,7 @@
         private static void Reset(EngineSim engineSim)
         {
             engineSim.resourceConsumptions.Reset();
+            engineSim.resourceFlowModes.Reset();
             engineSim.actualThrust = 0;
             engineSim.isActive = false;
             engineSim.isp = 0;
@@ -98,51 +100,72 @@
             engineSim.isActive = active;
             engineSim.thrustVec = vecThrust;
             engineSim.resourceConsumptions.Reset();
+            engineSim.resourceFlowModes.Reset();
             engineSim.appliedForces.Clear();
 
             double flowRate = 0.0;
             if (engineSim.partSim.hasVessel)
             {
+                if (log != null) log.buf.AppendLine("hasVessel is true"); 
+
                 float flowModifier = GetFlowModifier(atmChangeFlow, atmCurve, engineSim.partSim.part.atmDensity, velCurve, machNumber, ref engineSim.maxMach);
                 engineSim.isp = atmosphereCurve.Evaluate((float)atmosphere);
                 engineSim.thrust = GetThrust(Mathf.Lerp(minFuelFlow, maxFuelFlow, GetThrustPercent(thrustPercentage)) * flowModifier, engineSim.isp);
                 engineSim.actualThrust = engineSim.isActive ? resultingThrust : 0.0;
+                if (log != null)
+                {
+                    log.buf.AppendFormat("flowMod = {0:g6}\n", flowModifier);
+                    log.buf.AppendFormat("isp     = {0:g6}\n", engineSim.isp);
+                    log.buf.AppendFormat("thrust  = {0:g6}\n", engineSim.thrust);
+                    log.buf.AppendFormat("actual  = {0:g6}\n", engineSim.actualThrust);
+                }
 
                 if (throttleLocked)
                 {
+                    if (log != null) log.buf.AppendLine("throttleLocked is true, using thrust for flowRate");
                     flowRate = GetFlowRate(engineSim.thrust, engineSim.isp);
                 }
                 else
                 {
                     if (currentThrottle > 0.0f && engineSim.partSim.isLanded == false)
                     {
+                        if (log != null) log.buf.AppendLine("throttled up and not landed, using actualThrust for flowRate");
                         flowRate = GetFlowRate(engineSim.actualThrust, engineSim.isp);
                     }
                     else
                     {
+                        if (log != null) log.buf.AppendLine("throttled down or landed, using thrust for flowRate");
                         flowRate = GetFlowRate(engineSim.thrust, engineSim.isp);
                     }
                 }
             }
             else
             {
+                if (log != null) log.buf.AppendLine("hasVessel is false");
                 float flowModifier = GetFlowModifier(atmChangeFlow, atmCurve, CelestialBodies.SelectedBody.GetDensity(BuildAdvanced.Altitude), velCurve, machNumber, ref engineSim.maxMach);
                 engineSim.isp = atmosphereCurve.Evaluate((float)atmosphere);
                 engineSim.thrust = GetThrust(Mathf.Lerp(minFuelFlow, maxFuelFlow, GetThrustPercent(thrustPercentage)) * flowModifier, engineSim.isp);
+                engineSim.actualThrust = 0d;
+                if (log != null)
+                {
+                    log.buf.AppendFormat("flowMod = {0:g6}\n", flowModifier);
+                    log.buf.AppendFormat("isp     = {0:g6}\n", engineSim.isp);
+                    log.buf.AppendFormat("thrust  = {0:g6}\n", engineSim.thrust);
+                    log.buf.AppendFormat("actual  = {0:g6}\n", engineSim.actualThrust);
+                }
+
+                if (log != null) log.buf.AppendLine("no vessel, using thrust for flowRate");
                 flowRate = GetFlowRate(engineSim.thrust, engineSim.isp);
             }
 
             if (log != null) log.buf.AppendFormat("flowRate = {0:g6}\n", flowRate);
-
-            engineSim.thrust = flowRate * (engineSim.isp * IspG);
-            // I did not look into the diff between those 2 so I made them equal...
-            engineSim.actualThrust = engineSim.thrust;
 
             float flowMass = 0f;
             for (int i = 0; i < propellants.Count; ++i)
             {
                 Propellant propellant = propellants[i];
-                flowMass += propellant.ratio * ResourceContainer.GetResourceDensity(propellant.id);
+                if (!propellant.ignoreForIsp)
+                    flowMass += propellant.ratio * ResourceContainer.GetResourceDensity(propellant.id);
             }
 
             if (log != null) log.buf.AppendFormat("flowMass = {0:g6}\n", flowMass);
@@ -164,6 +187,7 @@
                         theEngine.partId,
                         consumptionRate);
                 engineSim.resourceConsumptions.Add(propellant.id, consumptionRate);
+                engineSim.resourceFlowModes.Add(propellant.id, (double)propellant.GetFlowMode());
             }
 
             double thrustPerThrustTransform = engineSim.thrust / thrustTransforms.Count;
@@ -269,7 +293,7 @@
                     sourcePartSets.Add(type, sourcePartSet);
                 }
 
-                switch (ResourceContainer.GetResourceFlowMode(type))
+                switch ((ResourceFlowMode)this.resourceFlowModes[type])
                 {
                     case ResourceFlowMode.NO_FLOW:
                         if (partSim.resources[type] > SimManager.RESOURCE_MIN && partSim.resourceFlowStates[type] != 0)

--- a/KerbalEngineer/VesselSimulator/Simulation.cs
+++ b/KerbalEngineer/VesselSimulator/Simulation.cs
@@ -139,6 +139,7 @@
                 log.buf.AppendLine("PrepareSimulation started");
                 dumpTree = true;
             }
+            this._timer.Reset();
             this._timer.Start();
 
             // Store the parameters in members for ease of access in other functions
@@ -299,6 +300,7 @@
                 MonoBehaviour.print("RunSimulation started");
             }
 
+            this._timer.Reset();
             this._timer.Start();
 
             LogMsg log = null;

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ