     /// Instantiate the table as a sawtooth wave
     mutating func positiveSawtoothWave() {
         values = [Float]()
-        let phsOfst = Int(phase*size)
-        for i in 0..<size {
-            values.append(Float((i+phsOfst)%size)/Float(size))
+        let phaseOffset = Int(phase * size)
+        for i in 0 ..< size {
+            values.append(Float((i + phaseOffset) % size) / Float(size))
         }
     }
 
     /// Instantiate the table as a reverse sawtooth wave
     mutating func positiveReverseSawtoothWave() {
         values = [Float]()
-        let phsOfst = Int(phase*size)
-        for i in 0..<size {
-            values.append(1.0 - Float((i+phsOfst)%size)/Float(size))
+        let phaseOffset = Int(phase * size)
+        for i in 0 ..< size {
+            values.append(1.0 - Float((i + phaseOffset) % size) / Float(size))
         }
     }
 
     /// Instantiate the table as a sine wave
     mutating func positiveSineWave() {
         values = [Float]()
-        let phsOfst = Int(phase*size)
-        for i in 0..<size {
-            values.append(0.5 + 0.5 * sin(2 * 3.14159265 * Float(i+phsOfst)/Float(size)))
+        let phaseOffset = Int(phase*size)
+        for i in 0 ..< size {
+            values.append(0.5 + 0.5 * sin(2 * 3.14159265 * Float(i + phaseOffset) / Float(size)))
         }
     }
 }

    /// Instantiate the table as a square wave
    mutating func positiveSquareWave() {
        values = [Float]()
        let phsOfst = Int(phase*size)
        for i in 0..<size {
            if (i+phsOfst)%size < size / 2 {
                values.append(0.0)
            } else {
                values.append(1.0)

    ///   - tableType: AKTableType of teh new table
    ///   - size: Size of the table (multiple of 2)
    ///
    public init(_ type: AKTableType = .Sine,
                  phase: Double = 0,
                  size: Int = 4096) {
        self.type = type
        self.phase = phase
        self.size = size
        
        switch type {
        case .Sine:
            self.standardSineWave()
