 			}
 		}
 	}
-	
-	// MARK: - Observer callbacks
-	
+}
+
+// MARK: - Observer callbacks
+
+extension VolumeBar {
+    
+    internal func addVolumeBarObservers() {
+        // Observe volume changes
+        AVAudioSession.sharedInstance().addObserver(self, forKeyPath: VolumeBar.AVAudioSessionOutputVolumeKey, options: [.old, .new], context: nil)
+        
+        // Observe when application enters and resumes from background
+        NotificationCenter.default.addObserver(self, selector: #selector(VolumeBar.applicationWillResignActive(notification:)), name: .UIApplicationWillResignActive, object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(VolumeBar.applicationDidBecomeActive(notification:)), name: .UIApplicationDidBecomeActive, object: nil)
+        
+        // Observe device rotation
+        NotificationCenter.default.addObserver(self, selector: #selector(VolumeBar.updateHeight), name: .UIDeviceOrientationDidChange, object: nil)
+    }
+    
+    internal func removeVolumeBarObservers() {
+        // Stop observing volume changes
+        AVAudioSession.sharedInstance().removeObserver(self, forKeyPath: VolumeBar.AVAudioSessionOutputVolumeKey)
+
+        // Remove suspend/resume observers
+        NotificationCenter.default.removeObserver(self, name: .UIApplicationWillResignActive, object: nil)
+        NotificationCenter.default.removeObserver(self, name: .UIApplicationDidBecomeActive, object: nil)
+        
+        // Stop observing device rotation
+        NotificationCenter.default.removeObserver(self, name: .UIDeviceOrientationDidChange, object: nil)
+    }
+    
 	/// Observe changes in volume.
 	///
 	/// This method is called when the user presses either of the volume buttons.

	/// Pressing either volume button changes volume by 0.0625 (experimentally determined constant).
	fileprivate static let volumeStep = 0.0625
	
	// MARK: - Init
	
	/// Creates a new instance of `VolumeBar`.

			print("VolumeBar: Initializing audio session failed.")
		}
		
        self.addVolumeBarObservers()
	}
	
	/// Stop observing changes in volume.
