A little code cleanup.
A little code cleanup.

--- a/AntennaRelay.cs
+++ b/AntennaRelay.cs
@@ -31,10 +31,6 @@
 using System.Linq;
 using ToadicusTools;
 
-// @DONE TODO: Retool nearestRelay to always contain the nearest relay, even if out of range.
-// @DONE TODO: Retool CanTransmit to not rely on nearestRelay == null.
-// TODO: Track occluded vessels somehow.
-
 namespace AntennaRange
 {
 	public class AntennaRelay
@@ -141,17 +137,6 @@
 			set;
 		}
 
-		/// <summary>
-		/// Gets a value indicating whether this <see cref="AntennaRange.ProtoDataTransmitter"/> has been checked during
-		/// the current relay attempt.
-		/// </summary>
-		/// <value><c>true</c> if relay checked; otherwise, <c>false</c>.</value>
-		public virtual bool relayChecked
-		{
-			get;
-			protected set;
-		}
-
 		public virtual bool KerbinDirect
 		{
 			get;
@@ -191,7 +176,7 @@
 
 			if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 			{
-				Tools.PostLogMessage(string.Format(
+				Tools.PostDebugMessage(string.Format(
 					"{0}: finding nearest relay for {1}",
 					this.GetType().Name,
 					this.ToString()
@@ -255,7 +240,7 @@
 
 					if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 					{
-						Tools.PostLogMessage("{6}: Vessel {0} discarded because we do not have line of sight." +
+						Tools.PostDebugMessage("{6}: Vessel {0} discarded because we do not have line of sight." +
 							"\npotentialSqrDistance: {1}, bestOccludedSqrDistance: {2}, maxTransmitSqrDistance: {3}" +
 							"\npotentialSqrDistance < bestOccludedSqrDistance: {4}" +
 							"\npotentialSqrDistance < (this.maxTransmitDistance * this.maxTransmitDistance): {5}",
@@ -274,7 +259,7 @@
 					{
 						if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 						{
-							Tools.PostLogMessage("{0}: Checking {1} relays on {2}.",
+							Tools.PostDebugMessage("{0}: Checking {1} relays on {2}.",
 								this.ToString(),
 								potentialVessel.GetAntennaRelays().Count(),
 								potentialVessel
@@ -285,7 +270,7 @@
 						{
 							if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 							{
-								Tools.PostLogMessage(this.ToString() +  " Checking candidate for bestOccludedRelay: {0}" +
+								Tools.PostDebugMessage(this.ToString() +  " Checking candidate for bestOccludedRelay: {0}" +
 									"\n\tCanTransmit: {1}", occludedRelay, occludedRelay.CanTransmit());
 							}
 
@@ -297,7 +282,7 @@
 
 								if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 								{
-									Tools.PostLogMessage(this.ToString() + " Found new bestOccludedRelay: {0}" +
+									Tools.PostDebugMessage(this.ToString() + " Found new bestOccludedRelay: {0}" +
 										"\nfirstOccludingBody: {1}" +
 										"\nbestOccludedSqrDistance: {2}",
 										occludedRelay,
@@ -320,7 +305,7 @@
 				{
 					if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 					{
-						Tools.PostLogMessage("{0}: Vessel {1} discarded because it is out of range, or farther than another relay.",
+						Tools.PostDebugMessage("{0}: Vessel {1} discarded because it is out of range, or farther than another relay.",
 							this.ToString(),
 							potentialVessel.vesselName
 						);
@@ -338,7 +323,7 @@
 
 						if (FlightGlobals.ActiveVessel != null && FlightGlobals.ActiveVessel.id == this.vessel.id)
 						{
-							Tools.PostLogMessage(string.Format("{0}: found new best relay {1} ({2})",
+							Tools.PostDebugMessage(string.Format("{0}: found new best relay {1} ({2})",
 								this.ToString(),
 								this.nearestRelay.ToString(),
 								this.nearestRelay.vessel.id
@@ -354,7 +339,7 @@
 			double kerbinSqrDistance = this.vessel.DistanceTo(Kerbin) - Kerbin.Radius;
 			kerbinSqrDistance *= kerbinSqrDistance;
 
-			System.Text.StringBuilder log = new System.Text.StringBuilder();
+			Tools.DebugLogger log = Tools.DebugLogger.New(this);
 
 			log.AppendFormat("{0} ({1}): Search done, figuring status.", this.ToString(), this.GetType().Name);
 
@@ -497,7 +482,7 @@
 
 			log.AppendFormat("\n{0}: Status determination complete.", this.ToString());
 
-			Tools.PostLogMessage(log.ToString());
+			log.Print();
 
 			// Now that we're done with our recursive CanTransmit checks, flag this relay as not checked so it can be
 			// used next time.

--- a/IAntennaRelay.cs
+++ b/IAntennaRelay.cs
@@ -69,13 +69,6 @@
 		CelestialBody firstOccludingBody { get; }
 
 		/// <summary>
-		/// Gets a value indicating whether this <see cref="AntennaRange.ProtoDataTransmitter"/> has been checked during
-		/// the current relay attempt.
-		/// </summary>
-		/// <value><c>true</c> if relay checked; otherwise, <c>false</c>.</value>
-		bool relayChecked { get; }
-
-		/// <summary>
 		/// Gets a value indicating whether this <see cref="AntennaRange.IAntennaRelay"/> Relay is communicating
 		/// directly with Kerbin.
 		/// </summary>

--- a/ModuleLimitedDataTransmitter.cs
+++ b/ModuleLimitedDataTransmitter.cs
@@ -280,21 +280,6 @@
 			}
 		}
 
-		// Reports whether this antenna has been checked as a viable relay already in the current FindNearestRelay.
-		public bool relayChecked
-		{
-			get
-			{
-				if (this.relay != null)
-				{
-					return this.relay.relayChecked;
-				}
-
-				// If our relay is null, always return null so we're never checked.
-				return true;
-			}
-		}
-
 		public bool KerbinDirect
 		{
 			get
@@ -506,8 +491,6 @@
 
 				message.Append("Beginning transmission ");
 
-				// @DONE TODO: Fix this to fall back to Kerbin if nearestRelay cannot be contacted.
-				// @DONE TODO: Remove nearestRelay == null
 				if (this.KerbinDirect)
 				{
 					message.Append("directly to Kerbin.");
@@ -515,7 +498,7 @@
 				else
 				{
 					message.Append("via ");
-					message.Append(this.relay.nearestRelay);
+					message.Append(this.relay.targetRelay);
 				}
 
 				ScreenMessages.PostScreenMessage(message.ToString(), 4f, ScreenMessageStyle.UPPER_LEFT);
@@ -626,8 +609,6 @@
 
 				message.Append("Beginning transmission ");
 
-				// @DONE TODO: Fix this to fall back to Kerbin if nearestRelay cannot be contacted.
-				// @DONE TODO: Remove nearestRelay == null
 				if (this.KerbinDirect)
 				{
 					message.Append("directly to Kerbin.");
@@ -635,7 +616,7 @@
 				else
 				{
 					message.Append("via ");
-					message.Append(this.relay.nearestRelay);
+					message.Append(this.relay.targetRelay);
 				}
 
 				ScreenMessages.PostScreenMessage(message.ToString(), 4f, ScreenMessageStyle.UPPER_LEFT);

--- a/ProtoAntennaRelay.cs
+++ b/ProtoAntennaRelay.cs
@@ -71,17 +71,6 @@
 		}
 
 		/// <summary>
-		/// Gets a value indicating whether this <see cref="AntennaRange.ProtoDataTransmitter"/> has been checked during
-		/// the current relay attempt.
-		/// </summary>
-		/// <value><c>true</c> if relay checked; otherwise, <c>false</c>.</value>
-		public override bool relayChecked
-		{
-			get;
-			protected set;
-		}
-
-		/// <summary>
 		/// Gets the underlying part's title.
 		/// </summary>
 		/// <value>The title.</value>