 	public func startWithSignal(_ setup: (_ signal: Signal<Value, Error>, _ interruptHandle: Disposable) -> Void) {
 		return core.startWithSignal(setup)
 	}
-
-	internal class Core {
-		/// Wraps a closure which, when invoked, produces a new instance of `Signal`, a
-		/// customized `observerDidSetup` post-creation side effect for the `Signal` and a
-		/// disposable to interrupt the produced `Signal`.
-		///
-		/// Unlike the safe `startWithSignal(_:)` API, `builder` shifts the responsibility of
-		/// invoking the post-creation side effect to the caller, while it takes from the
-		/// caller the responsibility of the `Signal` creation.
-		///
-		/// The design allows producer lifting to be as efficient as native `Signal`
-		/// operators, by eliminating the unnecessary relay `Signal` imposed by the old
-		/// `startWithSignal(_:)`, regardless of the fact that lifted operators can rely on
-		/// the upstreams for producer interruption.
-		///
-		/// `observerDidSetup` must be invoked before any other post-creation side effect.
-		struct Product {
-			let signal: Signal<Value, Error>
-			let observerDidSetup: () -> Void
-			let interruptHandle: Disposable
-		}
-
-		func make() -> Product {
-			fatalError()
-		}
-
-		func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
-			var disposable: Disposable!
-
-			startWithSignal { signal, innerDisposable in
-				signal.observe(observer)
-				disposable = innerDisposable
-			}
-
-			return disposable
-		}
-
-		internal func flatMapEvent<U, E>(_ transform: @escaping (@escaping Signal<U, E>.Observer.Action) -> (Signal<Value, Error>.Event) -> Void) -> SignalProducer<U, E> {
-			return SignalProducer<U, E>(SignalProducer<U, E>.EventTransformingCore(source: self, transform: transform))
-		}
-
-		final func startWithSignal(_ setup: (_ signal: Signal<Value, Error>, _ interruptHandle: Disposable) -> Void) {
-			let instance = make()
-			setup(instance.signal, instance.interruptHandle)
-			guard !instance.interruptHandle.isDisposed else { return }
-			instance.observerDidSetup()
-		}
-
-		static func makeSignalCore(_ action: @escaping () -> Product) -> Core {
-			return SignalCore(action)
-		}
-	}
-
-	private class SignalCore: Core {
-		private let _make: () -> Product
-
-		init(_ action: @escaping () -> Product) {
-			self._make = action
-		}
-
-		override func make() -> Product {
-			return _make()
-		}
-	}
-
-	private class EventTransformingCore<SourceValue, SourceError: Swift.Error>: Core {
-		private let source: SignalProducer<SourceValue, SourceError>.Core
-		private let transform: (@escaping Signal<Value, Error>.Observer.Action) -> (Signal<SourceValue, SourceError>.Event) -> Void
-
-		init(source: SignalProducer<SourceValue, SourceError>.Core, transform: @escaping (@escaping Signal<Value, Error>.Observer.Action) -> (Signal<SourceValue, SourceError>.Event) -> Void) {
-			self.source = source
-			self.transform = transform
-		}
-
-		internal override func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
-			return source.start(.init(observer, transform))
-		}
-
-		internal override func flatMapEvent<U, E>(_ transform: @escaping (@escaping Signal<U, E>.Observer.Action) -> (Signal<Value, Error>.Event) -> Void) -> SignalProducer<U, E> {
-			return SignalProducer<U, E>(SignalProducer<U, E>.EventTransformingCore(source: source) { [innerTransform = self.transform] action in
-				return innerTransform(transform(action))
-			})
-		}
-
-		internal override func make() -> Product {
-			let product = source.make()
-			let signal = Signal<Value, Error> { observer in
-				return product.signal.observe(.init(observer, transform))
-			}
-
-			return Product(signal: signal,
-			               observerDidSetup: product.observerDidSetup,
-			               interruptHandle: product.interruptHandle)
-		}
-	}
-
-	private class EventGeneratingCore: Core {
-		private let generator: (Signal<Value, Error>.Observer, Disposable) -> Void
-
-		init(_ generator: @escaping (Signal<Value, Error>.Observer, Disposable) -> Void) {
-			self.generator = generator
-		}
-
-		internal override func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
-			let d = NopDisposable.shared
-			generator(observer, d)
-			return d
-		}
-
-		internal override func make() -> Product {
-			let (signal, observer) = Signal<Value, Error>.pipe()
-			let d = AnyDisposable(observer.sendInterrupted)
-
-			return Product(signal: signal,
-			               observerDidSetup: { self.generator(observer, d) },
-			               interruptHandle: d)
-		}
+}
+
+internal class SignalProducerCore<Value, Error: Swift.Error> {
+	/// Wraps a closure which, when invoked, produces a new instance of `Signal`, a
+	/// customized `observerDidSetup` post-creation side effect for the `Signal` and a
+	/// disposable to interrupt the produced `Signal`.
+	///
+	/// Unlike the safe `startWithSignal(_:)` API, `builder` shifts the responsibility of
+	/// invoking the post-creation side effect to the caller, while it takes from the
+	/// caller the responsibility of the `Signal` creation.
+	///
+	/// The design allows producer lifting to be as efficient as native `Signal`
+	/// operators, by eliminating the unnecessary relay `Signal` imposed by the old
+	/// `startWithSignal(_:)`, regardless of the fact that lifted operators can rely on
+	/// the upstreams for producer interruption.
+	///
+	/// `observerDidSetup` must be invoked before any other post-creation side effect.
+	struct Product {
+		let signal: Signal<Value, Error>
+		let observerDidSetup: () -> Void
+		let interruptHandle: Disposable
+	}
+
+	func make() -> Product {
+		fatalError()
+	}
+
+	func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
+		var disposable: Disposable!
+
+		startWithSignal { signal, innerDisposable in
+			signal.observe(observer)
+			disposable = innerDisposable
+		}
+
+		return disposable
+	}
+
+	internal func flatMapEvent<U, E>(_ transform: @escaping (@escaping Signal<U, E>.Observer.Action) -> (Signal<Value, Error>.Event) -> Void) -> SignalProducer<U, E> {
+		return SignalProducer<U, E>(EventTransformingCore(source: self, transform: transform))
+	}
+
+	final func startWithSignal(_ setup: (_ signal: Signal<Value, Error>, _ interruptHandle: Disposable) -> Void) {
+		let instance = make()
+		setup(instance.signal, instance.interruptHandle)
+		guard !instance.interruptHandle.isDisposed else { return }
+		instance.observerDidSetup()
+	}
+}
+
+private final class SignalCore<Value, Error: Swift.Error>: SignalProducerCore<Value, Error> {
+	private let _make: () -> Product
+
+	init(_ action: @escaping () -> Product) {
+		self._make = action
+	}
+
+	override func make() -> Product {
+		return _make()
+	}
+}
+
+private final class EventTransformingCore<Value, Error: Swift.Error, SourceValue, SourceError: Swift.Error>: SignalProducerCore<Value, Error> {
+	private let source: SignalProducerCore<SourceValue, SourceError>
+	private let transform: (@escaping Signal<Value, Error>.Observer.Action) -> (Signal<SourceValue, SourceError>.Event) -> Void
+
+	init(source: SignalProducerCore<SourceValue, SourceError>, transform: @escaping (@escaping Signal<Value, Error>.Observer.Action) -> (Signal<SourceValue, SourceError>.Event) -> Void) {
+		self.source = source
+		self.transform = transform
+	}
+
+	internal override func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
+		return source.start(.init(observer, transform))
+	}
+
+	internal override func flatMapEvent<U, E>(_ transform: @escaping (@escaping Signal<U, E>.Observer.Action) -> (Signal<Value, Error>.Event) -> Void) -> SignalProducer<U, E> {
+		return SignalProducer<U, E>(EventTransformingCore<U, E, SourceValue, SourceError>(source: source) { [innerTransform = self.transform] action in
+			return innerTransform(transform(action))
+		})
+	}
+
+	internal override func make() -> Product {
+		let product = source.make()
+		let signal = Signal<Value, Error> { observer in
+			return product.signal.observe(.init(observer, transform))
+		}
+
+		return Product(signal: signal,
+		               observerDidSetup: product.observerDidSetup,
+		               interruptHandle: product.interruptHandle)
+	}
+}
+
+private final class EventGeneratingCore<Value, Error: Swift.Error>: SignalProducerCore<Value, Error> {
+	private let generator: (Signal<Value, Error>.Observer, Disposable) -> Void
+
+	init(_ generator: @escaping (Signal<Value, Error>.Observer, Disposable) -> Void) {
+		self.generator = generator
+	}
+
+	internal override func start(_ observer: Signal<Value, Error>.Observer) -> Disposable {
+		let d = NopDisposable.shared
+		generator(observer, d)
+		return d
+	}
+
+	internal override func make() -> Product {
+		let (signal, observer) = Signal<Value, Error>.pipe()
+		let d = AnyDisposable(observer.sendInterrupted)
+
+		return Product(signal: signal,
+		               observerDidSetup: { self.generator(observer, d) },
+		               interruptHandle: d)
 	}
 }
 

	///
	/// - parameters:
	///   - core: The `SignalProducer` core.
	internal init(_ core: Core) {
		self.core = core
	}


public struct SignalProducer<Value, Error: Swift.Error> {
	public typealias ProducedSignal = Signal<Value, Error>

	fileprivate let core: SignalProducerCore<Value, Error>

	/// Convert an entity into its equivalent representation as `SignalProducer`.
	///
