                         outputArray.removeAtIndex(i - 1)
                     }
                 default:
-                    println("Unrecognized operator.")
+                    outputArray.removeAll(keepCapacity: false)
+                    outputArray.append("An unknown error has occured.")
+                    return outputArray
                 }
                 i = 0
             } else {

    
    func solve(var equ: [String]) -> [String] {
        "Converting Infex to Postfex.."
        for (index, token) in enumerate(equ) {
            if opDic[token] != nil {
                if token == "(" {

                    outputArray[i] = "\(results)"
                    outputArray.removeAtIndex(i - 2)
                    outputArray.removeAtIndex(i - 2)
                case "!":
                    let mkbasics = MKBasics()
                    let tmp = mkbasics.factorial((outputArray[i - 1] as NSString).doubleValue)
                    outputArray[i] = "\(tmp)"
                    outputArray.removeAtIndex(i - 1)
                case "%":
                    if nums >= 1 {
                        var tmp = (outputArray[i - 1] as NSString).doubleValue / 100
