 			
 			var timerOnErrorDelay:Number = newManifest.targetDuration * 1000  / 2;
 			
-			// If we're not switching quality or going to a backup stream
-			if (reloadingQuality == lastQuality)
-			{
-				// Do nothing.
-			}
-			else if (reloadingQuality == targetQuality)
-			{
-				// If we are going to a quality level we don't know about, go ahead
-				// and best-effort-fetch a segment from it to establish the timebase.
-				if(!checkAnySegmentKnowledge(newManifest.segments) 
-					&& !_bestEffortDownloaderMonitor)
-				{
-					trace("(A) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
-					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, reloadingQuality, newManifest.segments);
-				} else if(!checkAnySegmentKnowledge(currentManifest.segments) 
-					&& !_bestEffortDownloaderMonitor)
-				{
-					trace("(B) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
-					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, lastQuality);
-				}
-
-				if(!checkAnySegmentKnowledge(newManifest.segments) || !checkAnySegmentKnowledge(currentManifest.segments))
-				{
-					trace("Bailing on reload due to lack of knowledge!");
-					
-					// re-reload.
-					reloadingManifest = null; // don't want to hang on to this one.
-					if (reloadTimer) reloadTimer.start();
-
-					return;
-				}
-
-			}
-
-			// Remap time.
-			if(reloadingQuality != lastQuality)
-			{
-				updateSegmentTimes(currentManifest.segments);
-				updateSegmentTimes(newManifest.segments);
-
-				const fudgeTime:Number = 1.0;
-				var lastSeg:HLSManifestSegment = getSegmentBySequence(currentManifest.segments, lastSequence);
-				var newSeg:HLSManifestSegment = lastSeg ? getSegmentContainingTime(newManifest.segments, lastSeg.startTime + lastSeg.duration) : null;
-				if(newSeg == null)
-				{
-					trace("Remapping from " + lastSequence);
-
-					if(lastSeg)
-					{
-						// Guess by time....
-						trace("Found last seg with startTime = " + lastSeg.startTime + " duration=" + lastSeg.duration);
-
-						// If the segment is beyond last ID, then jump to end...
-						if(lastSeg.startTime + lastSeg.duration >= newManifest.segments[newManifest.segments.length-1].startTime)
-						{
-							trace("ERROR: Couldn't remap sequence to new quality level, restarting at last time " + newManifest.segments[newManifest.segments.length-1].startTime);
-							lastSequence = newManifest.segments[newManifest.segments.length-1].id;
-						}
-						else
-						{
-							trace("ERROR: Couldn't remap sequence to new quality level, restarting at first time " + newManifest.segments[0].startTime);
-							lastSequence = newManifest.segments[0].id;
-						}
-					}
-					else
-					{
-						// Guess by sequence number...
-						trace("No last seg found");
-	
-						// If the segment is beyond last ID, then jump to end...
-						if(lastSequence >= newManifest.segments[newManifest.segments.length-1].id)
-						{
-							trace("ERROR: Couldn't remap sequence to new quality level, restarting at last sequence " + newManifest.segments[newManifest.segments.length-1].id);
-							lastSequence = newManifest.segments[newManifest.segments.length-1].id;
-						}
-						else
-						{
-							trace("ERROR: Couldn't remap sequence to new quality level, restarting at first sequence " + newManifest.segments[0].id);
-							lastSequence = newManifest.segments[0].id;
-						}
-					}
-				}
-				else
-				{
-					trace("Remapping from " + lastSequence + " to " + lastSeg.startTime + "-" + (lastSeg.startTime + lastSeg.duration));
-					trace("===== Remapping to " + lastSequence + " newId=" + (newSeg.id) + " newTime=" + newSeg.startTime + "-" + (newSeg.startTime + newSeg.duration) );
-					lastSequence = newSeg.id;
-				}
-
-				// Dec for next time around.
-				trace("   o Ended at " + lastSequence);
+			// Remap if needed.
+			var newSequence:int = remapSequence(getLastSequenceManifest(), newManifest, getLastSequence(), false);
+			if(newSequence == -1)
+			{
+				reloadingManifest = null; // don't want to hang on to it
+				if (reloadTimer) reloadTimer.start();				
+				trace("Can't remap to new manifest, aborting!")
+				return;
 			}
 
 			// Update our manifest for this quality level.

			for(var i:int=0; i<segments.length; i++)
			{
				var seg:HLSManifestSegment = segments[i];
				if(seg.startTime <= time && time <= (seg.startTime + seg.duration))
					return seg;
			}



			if(!segments)
			{
				trace("initiateBestEffortRequest - NO SEGMENTS FOUND, ABORTING initiateBestEffortRequest");
				return null;
			}

			if(nextFragmentId > segments.length - 1 || nextFragmentId == uint.MAX_VALUE)
			{
				trace("initiateBestEffortRequest - Capping to end of segment list " + (segments.length - 1));
				nextFragmentId = segments.length - 1;
			}

			_bestEffortFileHandler.segmentId = segments[nextFragmentId].id;
			_bestEffortFileHandler.key = getKeyForIndex( nextFragmentId );
