 import Result
 
 public class SpotijackSessionManager {
-    //MARK: Properties
+    //MARK: Properties - General
     public static let shared = SpotijackSessionManager()
     private let notiCenter = NotificationCenter.default
 
+    //MARK: Properties - Application Bridges
+    private var spotify: Result<SpotifyApplication> {
+        return startApplication(fromBundle: Bundles.spotify).flatMap {
+            .ok($0 as SpotifyApplication) // Always succeeds
+        }
+    }
+
+    private var audioHijack: Result<AudioHijackApplication> {
+        return startApplication(fromBundle: Bundles.audioHijack).flatMap {
+            .ok($0 as AudioHijackApplication) // Always succeeds
+        }
+    }
+
+    private var spotijackSession: Result<AudioHijackSession> {
+        return audioHijack.flatMap { ah in
+            let sessions = ah.sessions!() as! [AudioHijackSession] // Should never fail
+
+            if let session = sessions.first(where: { $0.name == "Spotijack" }) {
+                return .ok(session)
+            } else {
+                return .fail(SpotijackSessionError.spotijackSessionNotFound)
+            }
+        }
+    }
+
+    //MARK: Properties - State
     // Internal mute state used to track changes. Does not affect the actual mute
     // state in AHP.
     private var _isMuted: Bool = false {

        }
    }

    private var spotify: Result<SpotifyApplication> {
        return startApplication(fromBundle: Bundles.spotify).flatMap {
            .ok($0 as SpotifyApplication) // Always succeeds
        }
    }

    private var audioHijack: Result<AudioHijackApplication> {
        return startApplication(fromBundle: Bundles.audioHijack).flatMap {
            .ok($0 as AudioHijackApplication) // Always succeeds
        }
    }

    private var spotijackSession: Result<AudioHijackSession> {
        return audioHijack.flatMap { ah in
            let sessions = ah.sessions!() as! [AudioHijackSession] // Should never fail

            if let session = sessions.first(where: { $0.name == "Spotijack" }) {
                return .ok(session)
            } else {
                return .fail(SpotijackSessionError.spotijackSessionNotFound)
            }
        }
    }

    /// Attempts to start Audio Hijack Pro, Spotify and the Spotijack session.
    /// The behaviour of SpotijackSessionManager is undefined if this function
    /// is not called at least once.

    }

    //MARK: Types
    enum SpotijackSessionError: Error {
        /// The Spotify bundle could not be found or the application failed to
        /// start for some exceptional reason.
