     
     let dir: String
     
-    var methods: [String: ((String) throws -> String?)] = [:]
+    var functions: [String: ((String) throws -> String?)] = [:]
+    var methods: [String: ((String, String) throws -> String?)] = [:]
     var properties: [String: String?] = [:]
     var constants: [String: String?] = [:]
     
     init(dir: String, code: String) throws {
         self.dir = dir
         let lines = code.componentsSeparatedByString("\n")
-        // MARK: default properties
-        constants["_PLATFORM"] = "iOS"
+        // MARK: constants & default properties
+        constants["_PLATFORM_OS"] = "iOS"
+        constants["_PLATFORM_DEVICE_MODEL"] = UIDevice.currentDevice().localizedModel
+        constants["_PLATFORM_DEVICE_NAME"] = UIDevice.currentDevice().name
         constants["_PLATFORM_VERSION"] = UIDevice.currentDevice().systemVersion
         constants["_BREAKBALOON_VERSION"] = "1.0.0"
         properties["theme.id"] = null

        properties["image.icon"] = null
        properties["image.wicon"] = null
        properties["image.cursor"] = null
        // MARK: methods
        methods["print"] = printString
        methods["fileGetContents"] = fileGetContents
        // MARK: parse
        var commands: [(Int, String)] = []
        for line in 0..<lines.count {

    func fileGetContents(stringLiteral: String) throws -> String? {
        let argument = try execIfNeeds(stringLiteral)!
        do {
            return try FileSaveHelper(fileName: argument, fileExtension: argument.containsString(".") ? .NONE : .PNG, subDirectory: dir).getData().base64EncodedStringWithOptions(.Encoding64CharacterLineLength)
        } catch {
            print("Couldn't get file content of \(argument)\(argument.containsString(".") ? "" : ".png"): \(error)")
            throw error
        }
    }
    
    func blackAndWhite(variable: String, stringLiteral: String) throws -> String? {
        let ciImage = CIImage(data: NSData(base64EncodedString: get(variable)!, options: NSDataBase64DecodingOptions.IgnoreUnknownCharacters)!)!
        let grayscale = ciImage.imageByApplyingFilter("CIColorControls", withInputParameters: [ kCIInputSaturationKey: 0.0 ])
        set(variable, value: UIImagePNGRepresentation(UIImage(CIImage: grayscale))!.base64EncodedStringWithOptions(.Encoding64CharacterLineLength))
        return nil
    }
    
    func getThemeID() -> String {
