         case CallUndeclaredMethodError
         case SyntaxError
         case NullPointerError
+        case EditConstantError
     }
 }
            }
            print("Tried to concat a value to the undeclared variable \(variable)")
            throw ExecErrors.AssignUndeclaredVariableError
        } else if cmd.containsString("="){
            // Assignation
            let vals = cmd.componentsSeparatedByString("=")
            let property = NSString(string: vals[0]).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())

        }
        let ciImage = CIImage(data: NSData(base64EncodedString: get(variable)!, options: NSDataBase64DecodingOptions.IgnoreUnknownCharacters)!)!
        let grayscale = ciImage.imageByApplyingFilter("CIColorControls", withInputParameters: [ kCIInputSaturationKey: 0.0 ])
        try set(variable, value: UIImagePNGRepresentation(UIImage(CIImage: grayscale))!.base64EncodedStringWithOptions(.Encoding64CharacterLineLength))
        return nil
    }
    
    func rotate(variable: String, stringLiteral: String) throws -> String? {
        if get(variable) == nil {
            print("Tried to rotate a null image")
            throw ExecErrors.NullPointerError
        }
        var radians: CGFloat
        if stringLiteral.hasSuffix("°") {
            var degrees = stringLiteral
            degrees.removeAtIndex(stringLiteral.endIndex)
            radians = CGFloat(Int(degrees)!) * (180 / CGFloat(M_PI))
        } else {
            radians = CGFloat(Float(stringLiteral)!)
        }
        try set(variable, value: UIImagePNGRepresentation(rotateImpl(getImage(variable), radians: radians, flip: false))!.base64EncodedStringWithOptions(.Encoding64CharacterLineLength))
        return nil
    }
    
    func rotateFlip(variable: String, stringLiteral: String) throws -> String? {
        if get(variable) == nil {
            print("Tried to rotate a null image")
            throw ExecErrors.NullPointerError
        }
        var radians: CGFloat
        if stringLiteral.hasSuffix("°") {
            var degrees = stringLiteral
            degrees.removeAtIndex(stringLiteral.endIndex)
            radians = CGFloat(Int(degrees)!) * (180 / CGFloat(M_PI))
        } else {
            radians = CGFloat(Float(stringLiteral)!)
        }
        try set(variable, value: UIImagePNGRepresentation(rotateImpl(getImage(variable), radians: radians, flip: true))!.base64EncodedStringWithOptions(.Encoding64CharacterLineLength))
        return nil
    }
    
    func rotateImpl(image: UIImage, radians: CGFloat, flip: Bool) -> UIImage {
        let rotatedViewBox = UIView(frame: CGRect(origin: CGPointZero, size: image.size))
        rotatedViewBox.transform = CGAffineTransformMakeRotation(radians)
        
        UIGraphicsBeginImageContext(rotatedViewBox.frame.size)
        let bitmap = UIGraphicsGetCurrentContext()
        CGContextTranslateCTM(bitmap, rotatedViewBox.frame.width / 2.0, rotatedViewBox.frame.height / 2.0)
        CGContextRotateCTM(bitmap, radians)
        CGContextScaleCTM(bitmap, flip ? -1.0 : 1.0, -1.0)
        CGContextDrawImage(bitmap, CGRectMake(-image.size.width / 2, -image.size.height / 2, image.size.width, image.size.height), image.CGImage)
        let newImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return newImage
    }
    
    func toLower(variable: String, stringLiteral: String) throws -> String? {
