VOID_CBInfoBrowser: Remove a bunch of commented old code. Make bodies without atmosphere say so.
VOID_CBInfoBrowser: Remove a bunch of commented old code. Make bodies without atmosphere say so.

--- /dev/null
+++ b/VOIDEditorMaster.cs
@@ -1,1 +1,100 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+//    VOID - Vessel Orbital Information Display for Kerbal Space Program
+//    Copyright (C) 2012 Iannic-ann-od
+//    Copyright (C) 2013 Toadicus
+//
+//    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/>.
+//
+///////////////////////////////////////////////////////////////////////////////
+//
+//  Much, much credit to Younata, Adammada, Nivvydaskrl and to all the authors
+//  behind MechJeb, RemoteTech Relay Network, ISA MapSat, and Protractor for some
+//  invaluable functions and making your nicely written code available to learn from.
+//
+///////////////////////////////////////////////////////////////////////////////
+//
+//  This software uses VesselSimulator and Engineer.Extensions from Engineer Redux.
+//  Engineer Redux (c) 2013 cybutek
+//  Used by permission.
+//
+///////////////////////////////////////////////////////////////////////////////
 
+using System;
+using UnityEngine;
+using Engineer.VesselSimulator;
+
+namespace VOID
+{
+	[KSPAddon(KSPAddon.Startup.EditorAny, false)]
+	public class VOIDEditorMaster : MonoBehaviour
+	{
+		protected VOID_EditorCore Core;
+
+		public void Awake()
+		{
+			Tools.PostDebugMessage ("VOIDEditorMaster: Waking up.");
+			this.Core = VOID_EditorCore.Instance;
+			this.Core.ResetGUI ();
+			SimManager.HardReset();
+			Tools.PostDebugMessage ("VOIDEditorMaster: Awake.");
+		}
+
+		public void Update()
+		{
+			if (!HighLogic.LoadedSceneIsEditor && this.Core != null)
+			{
+				this.Core.SaveConfig ();
+				this.Core = null;
+				VOID_EditorCore.Reset();
+				return;
+			}
+
+			if (this.Core == null)
+			{
+				this.Awake();
+			}
+
+			this.Core.Update ();
+
+			if (this.Core.factoryReset)
+			{
+				KSP.IO.File.Delete<VOID_EditorCore>("config.xml");
+				this.Core = null;
+				VOID_EditorCore.Reset();
+			}
+		}
+
+		public void FixedUpdate()
+		{
+			if (this.Core == null || !HighLogic.LoadedSceneIsEditor)
+			{
+				return;
+			}
+
+			this.Core.FixedUpdate ();
+		}
+
+		public void OnGUI()
+		{
+			if (this.Core == null)
+			{
+				return;
+			}
+
+			this.Core.OnGUI();
+		}
+	}
+}
+

--- a/VOIDFlightMaster.cs
+++ b/VOIDFlightMaster.cs
@@ -96,65 +96,5 @@
 			this.Core.OnGUI();
 		}
     }
-
-	[KSPAddon(KSPAddon.Startup.EditorAny, false)]
-	public class VOIDEditorMaster : MonoBehaviour
-	{
-		protected VOID_EditorCore Core;
-
-		public void Awake()
-		{
-			Tools.PostDebugMessage ("VOIDEditorMaster: Waking up.");
-			this.Core = VOID_EditorCore.Instance;
-			this.Core.ResetGUI ();
-			SimManager.HardReset();
-			Tools.PostDebugMessage ("VOIDEditorMaster: Awake.");
-		}
-
-		public void Update()
-		{
-			if (!HighLogic.LoadedSceneIsEditor && this.Core != null)
-			{
-				this.Core.SaveConfig ();
-				this.Core = null;
-				VOID_EditorCore.Reset();
-				return;
-			}
-
-			if (this.Core == null)
-			{
-				this.Awake();
-			}
-
-			this.Core.Update ();
-
-			if (this.Core.factoryReset)
-			{
-				KSP.IO.File.Delete<VOID_EditorCore>("config.xml");
-				this.Core = null;
-				VOID_EditorCore.Reset();
-			}
-		}
-
-		public void FixedUpdate()
-		{
-			if (this.Core == null || !HighLogic.LoadedSceneIsEditor)
-			{
-				return;
-			}
-
-			this.Core.FixedUpdate ();
-		}
-
-		public void OnGUI()
-		{
-			if (this.Core == null)
-			{
-				return;
-			}
-
-			this.Core.OnGUI();
-		}
-	}
 }
 

--- a/VOID_CBInfoBrowser.cs
+++ b/VOID_CBInfoBrowser.cs
@@ -98,8 +98,6 @@
 			GUILayout.EndVertical();
 
 			GUILayout.EndHorizontal();
-
-			//}
 
 			//toggle for orbital info chunk
 			if (GUILayout.Button("Orbital Characteristics", GUILayout.ExpandWidth(true))) toggleOrbital.value = !toggleOrbital;
@@ -206,84 +204,53 @@
 
 		private void body_OP_show_orbital_info(CelestialBody body)
 		{
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.ApA / 1000).ToString("##,#") + "km", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(Tools.ConvertInterval(body.orbit.timeToAp), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.PeA / 1000).ToString("##,#") + "km", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(Tools.ConvertInterval(body.orbit.timeToPe), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.semiMajorAxis / 1000).ToString("##,#") + "km", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(body.orbit.eccentricity.ToString("F4") + "", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(Tools.ConvertInterval(body.orbit.period), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(Tools.ConvertInterval(body.rotationPeriod), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.orbitalSpeed / 1000).ToString("F2") + "km/s", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			// Toadicus edit: convert mean anomaly into degrees.
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.meanAnomaly * 180d / Math.PI).ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(body.orbit.trueAnomaly.ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			// Toadicus edit: convert eccentric anomaly into degrees.
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label((body.orbit.eccentricAnomaly * 180d / Math.PI).ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(body.orbit.inclination.ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(body.orbit.LAN.ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else GUILayout.Label(body.orbit.argumentOfPeriapsis.ToString("F3") + "°", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-		    //GUILayout.EndHorizontal();
-
-		    //GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 		    if (body.bodyName == "Sun") GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    else
 		    {
@@ -291,42 +258,28 @@
 		        if (body.tidallyLocked) body_tidally_locked = "Yes";
 		        GUILayout.Label(body_tidally_locked, VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 		    }
-		    //GUILayout.EndHorizontal();
 		}
 
 		private void body_OP_show_physical_info(CelestialBody body)
 		{
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label((body.Radius / 1000).ToString("##,#") + "km", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label(((Math.Pow((body.Radius), 2) * 4 * Math.PI) / 1000).ToString("0.00e+00") + "km²", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			// divide by 1000 to convert m to km
 			GUILayout.Label((((4d / 3) * Math.PI * Math.Pow(body.Radius, 3)) / 1000).ToString("0.00e+00") + "km³", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.Label(((4 / 3) * Math.PI * Math.Pow((vessel.mainBody.Radius / 1000), 3)).ToString(), right, GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label(body.Mass.ToString("0.00e+00") + "kg", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
 
 			double p = body.Mass / (Math.Pow(body.Radius, 3) * (4d / 3) * Math.PI);
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label(p.ToString("##,#") + "kg/m³", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			if (body.bodyName == "Sun") GUILayout.Label(Tools.MuMech_ToSI(body.sphereOfInfluence), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
 			else GUILayout.Label(Tools.MuMech_ToSI(body.sphereOfInfluence), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label(body.orbitingBodies.Count.ToString(), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
 
 			//show # artificial satellites
 			int num_art_sats = 0;
@@ -334,31 +287,33 @@
 			{
 				if (v.mainBody == body && v.situation.ToString() == "ORBITING") num_art_sats++;
 			}
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+				
 			GUILayout.Label(num_art_sats.ToString(), VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
 
 			double g_ASL = (VOID_Core.Constant_G * body.Mass) / Math.Pow(body.Radius, 2);
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+
 			GUILayout.Label(Tools.MuMech_ToSI(g_ASL) + "m/s²", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-			GUILayout.Label("≈ " + Tools.MuMech_ToSI(body.maxAtmosphereAltitude) + "m", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-			string O2 = "No";
-			if (body.atmosphereContainsOxygen == true) O2 = "Yes";
-			GUILayout.Label(O2, VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
-
-			//GUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
-			string ocean = "No";
-			if (body.ocean == true) ocean = "Yes";
-			GUILayout.Label(ocean, VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
-			//GUILayout.EndHorizontal();
+
+			if (body.atmosphere)
+			{
+				GUILayout.Label("≈ " + Tools.MuMech_ToSI(body.maxAtmosphereAltitude) + "m",
+					VOID_Core.Instance.LabelStyles["right"],
+					GUILayout.ExpandWidth(true));
+
+				string O2 = "No";
+				if (body.atmosphereContainsOxygen == true) O2 = "Yes";
+				GUILayout.Label(O2, VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
+
+				string ocean = "No";
+				if (body.ocean == true) ocean = "Yes";
+				GUILayout.Label(ocean, VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
+			}
+			else
+			{
+				GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
+				GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
+				GUILayout.Label("N/A", VOID_Core.Instance.LabelStyles["right"], GUILayout.ExpandWidth(true));
+			}
 		}
 	}
 }

--- a/VOID_EditorCore.cs
+++ b/VOID_EditorCore.cs
@@ -122,7 +122,8 @@
 
 			if (EditorLogic.SortedShipList.Count > 0)
 			{
-				SimManager.Instance.Gravity = 9.08665;
+				SimManager.Instance.Gravity = this.Kerbin.gravParameter /
+					Math.Pow(this.Kerbin.Radius, 2);
 				SimManager.Instance.TryStartSimulation();
 			}
 

--- a/VOID_VesselInfo.cs
+++ b/VOID_VesselInfo.cs
@@ -43,7 +43,7 @@
 
 		protected VOID_DoubleValue totalMass = new VOID_DoubleValue(
 			"Total Mass",
-			new Func<double>(() => VOID_Core.Instance.vessel.GetTotalMass()),
+			new Func<double> (() => SimManager.Instance.TryGetLastMass()),
 			"tons"
 		);
 
@@ -118,7 +118,7 @@
 
 				double currThrust = SimManager.Instance.LastStage.actualThrust;
 				double maxThrust = SimManager.Instance.LastStage.thrust;
-				double mass = VOID_Core.Instance.vessel.GetTotalMass();
+				double mass = SimManager.Instance.TryGetLastMass();
 				double gravity = VOID_Core.Instance.vessel.mainBody.gravParameter /
 				                 Math.Pow(
 					                 VOID_Core.Instance.vessel.mainBody.Radius + VOID_Core.Instance.vessel.altitude,
@@ -142,7 +142,7 @@
 					return double.NaN;
 
 				double maxThrust = SimManager.Instance.LastStage.thrust;
-				double mass = VOID_Core.Instance.vessel.GetTotalMass();
+				double mass = SimManager.Instance.TryGetLastMass();
 				double gravity = (VOID_Core.Constant_G * VOID_Core.Instance.vessel.mainBody.Mass) /
 				                 Math.Pow(VOID_Core.Instance.vessel.mainBody.Radius, 2);
 				double weight = mass * gravity;
@@ -214,8 +214,6 @@
 				SimManager.Instance.RequestSimulation();
 			}
 
-			Stage[] stages = SimManager.Instance.Stages;
-
 			GUILayout.BeginVertical();
 
 			GUILayout.Label(