 	}
 
 	private func setupKnobLayer() {
-		knobLayer.autoresizingMask = [.LayerWidthSizable]
-		knobLayer.backgroundColor = NSColor.whiteColor().CGColor
+		knobLayer.autoresizingMask = [.layerWidthSizable]
+		knobLayer.backgroundColor = NSColor.white.cgColor
 		knobLayer.frame = knobContainer.bounds
 		knobLayer.cornerRadius = ceil(knobContainer.bounds.height / 2)
 	}
 
 	private func setupKnobLayerShadows() {
-		let effectScale = backgroundLayer.bounds.height / baseHeight
+		let effectScale = scaleFactor
 		// Small Stroke
 		let smallStroke = knobShadows.smallStroke
 		smallStroke.frame = knobLayer.frame.insetBy(dx: -1, dy: -1)
-		smallStroke.autoresizingMask = [.LayerWidthSizable]
-		smallStroke.backgroundColor = NSColor.blackColor().colorWithAlphaComponent(0.06).CGColor
+		smallStroke.autoresizingMask = [.layerWidthSizable]
+		smallStroke.backgroundColor = NSColor.black.withAlphaComponent(0.06).cgColor
 		smallStroke.cornerRadius = ceil(smallStroke.bounds.height / 2)
 
 		let smallShadow = knobShadows.smallShadow
 		smallShadow.frame = knobLayer.frame.insetBy(dx: 2, dy: 2)
-		smallShadow.autoresizingMask = [.LayerWidthSizable]
+		smallShadow.autoresizingMask = [.layerWidthSizable]
 		smallShadow.cornerRadius = ceil(smallShadow.bounds.height / 2)
-		smallShadow.backgroundColor = NSColor.redColor().CGColor
-		smallShadow.shadowColor = NSColor.blackColor().CGColor
+		smallShadow.backgroundColor = NSColor.red.cgColor
+		smallShadow.shadowColor = NSColor.black.cgColor
 		smallShadow.shadowOffset = CGSize(width: 0, height: -3 * effectScale)
 		smallShadow.shadowOpacity = 0.12
 		smallShadow.shadowRadius = 2.0 * effectScale
 
 		let mediumShadow = knobShadows.mediumShadow
 		mediumShadow.frame = smallShadow.frame
-		mediumShadow.autoresizingMask = [.LayerWidthSizable]
+		mediumShadow.autoresizingMask = [.layerWidthSizable]
 		mediumShadow.cornerRadius = smallShadow.cornerRadius
-		mediumShadow.backgroundColor = NSColor.redColor().CGColor
-		mediumShadow.shadowColor = NSColor.blackColor().CGColor
+		mediumShadow.backgroundColor = NSColor.red.cgColor
+		mediumShadow.shadowColor = NSColor.black.cgColor
 		mediumShadow.shadowOffset = CGSize(width: 0, height: -9 * effectScale)
 		mediumShadow.shadowOpacity = 0.16
 		mediumShadow.shadowRadius = 6.0 * effectScale
 
 		let bigShadow = knobShadows.bigShadow
 		bigShadow.frame = smallShadow.frame
-		bigShadow.autoresizingMask = [.LayerWidthSizable]
+		bigShadow.autoresizingMask = [.layerWidthSizable]
 		bigShadow.cornerRadius = smallShadow.cornerRadius
-		bigShadow.backgroundColor = NSColor.redColor().CGColor
-		bigShadow.shadowColor = NSColor.blackColor().CGColor
+		bigShadow.backgroundColor = NSColor.red.cgColor
+		bigShadow.shadowColor = NSColor.black.cgColor
 		bigShadow.shadowOffset = CGSize(width: 0, height: -9 * effectScale)
 		bigShadow.shadowOpacity = 0.06
 		bigShadow.shadowRadius = 0.5 * effectScale

	}

	// MARK: - Helpers
	private func knobFrameForState(on on: Bool, pressed: Bool) -> CGRect {
		let borderWidth = 3.0 * ceil(backgroundLayer.bounds.height / baseHeight)
		var origin: CGPoint
		var size: CGSize {
			if pressed {
				return CGSize(
					width: ceil(backgroundLayer.bounds.width * 0.69) - (2 * borderWidth),
					height: backgroundLayer.bounds.height - (2 * borderWidth)
				)
			}
			return CGSize(width: backgroundLayer.bounds.height - (2 * borderWidth), height: backgroundLayer.bounds.height - (2 * borderWidth))
		}

		if on {
			origin = CGPoint(x: backgroundLayer.bounds.width - size.width - borderWidth, y: borderWidth)
		} else {
			origin = CGPoint(x: borderWidth, y: borderWidth)
		}

	// MARK: - Drawing
	public override func updateLayer() {
		// Background
		backgroundLayer.cornerRadius = ceil(bounds.height / 2)
		backgroundLayer.borderWidth = on ? ceil(bounds.height) : 3.0 * scaleFactor
		backgroundLayer.borderColor = on ? tintColor.cgColor : NSColor.black.withAlphaComponent(0.09).cgColor

		// Knob
		knobContainer.frame = knobFrameForState(on: on, pressed: pressed)
