     - returns: A String of the encoded bytes.
 */
 public func EncodeString(bytes : [UInt8], alphabet : Alphabet = .Standard) -> String {
-    let encoded = Encode(bytes, alphabet : alphabet)
+    let encoded = Encode(bytes: bytes, alphabet : alphabet)
     var result = String()
     for b in encoded {
-        result.append(UnicodeScalar(b))
+        result.append(String(UnicodeScalar(b)))
     }
     return result
 }

    }
    
    return encoded
}
public func Encode(bytes : [UInt8], alphabet : Alphabet = .Standard) -> [UInt8] {
    var encoded : [UInt8] = []
    
    let table = tableForAlphabet(alphabet: alphabet)
    let padding = table[64]
    
    let count = bytes.count
    
    var i = 0
    
    for c in stride(from: 0,to:count, by: 3) {
        let one = bytes[c] >> 2
        let two = ((bytes[c] & 0b11) << 4) | ((bytes[c+1] & 0b11110000) >> 4)
        let three = ((bytes[c+1] & 0b00001111) << 2) | ((bytes[c+2] & 0b11000000) >> 6)
        let four = bytes[c+2] & 0b00111111
        
        encoded.append(table[Int(one)])
        encoded.append(table[Int(two)])
        encoded.append(table[Int(three)])
        encoded.append(table[Int(four)])
        i = c
    }
    
    if i+2 == count {
