 			}
 		}
 	}
-
-	/**
-		This represents the discrete upper and lower values.
-	*/
-
-	var discreteCurrentValue: RangeValue = RangeValue(lower: 0, upper: 1) {
+	
+	/**
+	This represents the discrete upper and lower values.
+	*/
+	
+	public var discreteCurrentValue: RangeValue = RangeValue(lower: 0, upper: 1) {
 		didSet {
 			updateLayerFrames()
 		}
 	}
-
-	/**
-		This gives the continuous upper and lower values.
-	*/
-
-	var continuousCurrentValue: RangeValue {
+	
+	/**
+	This gives the continuous upper and lower values.
+	*/
+	
+	public var continuousCurrentValue: RangeValue {
 		return RangeValue(lower: lowerValue, upper: upperValue)
 	}
-
+	
 	// MARK: - Private variables
-
+	
 	private var intervals: [Interval] = []
 	private var preSelectedRange: RangeValue?
 	private var nodesList = [Float]()

}

/**
	The struct to encapsulate the information of interval.
	
	Initialization:
	```
	Interval(min: 50000, max: 100000, stepValue: 10000)
	```
*/

public struct Interval {
	var min: Float = 0.0
	var max: Float = 1.0
	var stepValue: Float = 1.0

	func nodeCount() -> Int {
		return Int((max - min) / stepValue) - 1
	}

	func generateNodes() -> [Float] {
		var nodes = [Float]()
		var index = min
		while index <= max {
			nodes.append(index)
			index += stepValue
		}
		return nodes
	}
}

public struct RangeValue {
	var lower: Float = 0.0
	var upper: Float = 0.0
}

class RangeSliderTrackLayer: CALayer {
	static let defaultHighlightTintColor = UIColor(red: 0, green: 122/255.0, blue: 255.0/255.0, alpha: 1.0)
	static let defaultTintColor = UIColor.lightGrayColor()

	var highlightedPath = Path(origin: 0, length: 0)
	var highlightTintColor: UIColor?
	var tintColor: UIColor?
	var curvaceousness: CGFloat = 2.0

	override func drawInContext(ctx: CGContext) {
		// Clip
		let cornerRadius = bounds.height * curvaceousness / 2.0
		let path = UIBezierPath(roundedRect: bounds, cornerRadius: cornerRadius)
		CGContextAddPath(ctx, path.CGPath)

		// Fill the track
		CGContextSetFillColorWithColor(ctx, (tintColor ?? RangeSliderTrackLayer.defaultTintColor).CGColor)
		CGContextAddPath(ctx, path.CGPath)
		CGContextFillPath(ctx)

		// Fill the highlighted range
		CGContextSetFillColorWithColor(ctx, (highlightTintColor ?? RangeSliderTrackLayer.defaultHighlightTintColor).CGColor)
		let rect = CGRect(x: highlightedPath.origin, y: 0.0, width: highlightedPath.length, height: bounds.height)

		let value = Float(scaledPosition - lower) * valueDifference / Float(scale)
		return nodesList[nodeNumber] + value
	}
	
	/**
	This method updates upperCenter(the center of upper thumb), upperValue and upper property of discreteCurrentValue
	
	- Parameter offset : The distance moved by upper thumb with respect to last location
	
	*/
	private func updateUpperValue(offset: CGFloat) {
		upperCenter = boundValue(upperCenter + offset, lowerValue: CGRectGetMidX(lowerThumbLayer.frame) + thumbSize.width,
