 
 extension NSString {
     /**
-    CacheContainer caches
-     - UTF16 based NSRange, UTF8 based NSRange and Line
+    CacheContainer caches:
+
+    - UTF16-based NSRange
+    - UTF8-based NSRange
+    - Line
     */
     @objc private class CacheContainer: NSObject {
         struct RangesAndLine {

                return element.range.location
            } else if element.byteRange.length == diff {
                return NSMaxRange(element.range)
            } else {
                let endUTF16index = element.line.content.utf8.startIndex.advancedBy(diff)
                .samePositionIn(element.line.content.utf16)!
                let utf16Diff = element.line.content.utf16.startIndex.distanceTo(endUTF16index)
                return element.range.location + utf16Diff
            }
        }

        /**
         Returns UTF8 offset from UTF16 offset
         - parameter location: UTF16 based offset of string
         - returns: UTF8 based offset of string
        */
        func byteOffsetFromLocation(location: Int) -> Int {
            if self.rangesAndLine.isEmpty {
                return 0
            }
            guard let index = rangesAndLine.indexOf({ NSLocationInRange(location, $0.range) }) else {

                return element.byteRange.location
            } else if element.range.length == diff {
                return NSMaxRange(element.byteRange)
            }
            let endUTF8index = element.line.content.utf16.startIndex.advancedBy(diff)
                                      .samePositionIn(element.line.content.utf8)!
            let byteDiff = element.line.content.utf8.startIndex.distanceTo(endUTF8index)
            return element.byteRange.location + byteDiff
        }

        var lines: [Line] {
