                     throw ExecErrors.SyntaxError
                 }
                 arg.removeRange(range!.startIndex..<arg.endIndex)
-                return try methods[methodName]!(arg)
+                return try functions[methodName]!(arg)
+            }
+            let lastDot = methodName.rangeOfString(".", options: .BackwardsSearch)!.startIndex
+            if methods[methodName[lastDot.successor()..<methodName.endIndex]] != nil && valueExists(methodName[methodName.startIndex..<lastDot]) {
+                components.removeFirst()
+                var arg = components.joinWithSeparator("(")
+                let range = arg.rangeOfString(")", options: .BackwardsSearch)
+                if range == nil {
+                    print("Missing closing bracket ')'")
+                    throw ExecErrors.SyntaxError
+                }
+                arg.removeRange(range!.startIndex..<arg.endIndex)
+                return try methods[methodName[lastDot.successor()..<methodName.endIndex]]!(methodName[methodName.startIndex..<lastDot], arg)
             }
         }
         return null
+    }
+    
+    func valueExists(name: String) -> Bool {
+        return constants[name] != nil || properties[name] != nil
+    }
+    
+    func set(name: String, value: String) {
+        if constants[name] != nil {
+            constants[name] = value
+        } else if properties[name] != nil {
+            properties[name] = value
+        }
+    }
+    
+    func get(name: String) -> String? {
+        if constants[name] != nil {
+            return constants[name]!
+        } else if properties[name] != nil {
+            return properties[name]!
+        }
+        return nil
     }
     
     func value(vals: [String]) throws -> String? {

    func fileGetContents(stringLiteral: String) throws -> String? {
        let argument = try execIfNeeds(stringLiteral)!
        do {
            return try FileSaveHelper(fileName: argument, fileExtension: argument.containsString(".") ? .NONE : .PNG, subDirectory: dir).getContentsOfFile()
        } catch {
            print("Couldn't get file content of \(argument)\(argument.containsString(".") ? "" : ".png"): \(error)")
            throw error
        }
    }
    
    func getThemeID() -> String {

        } else if cmd.containsString("(") {
            var components = cmd.componentsSeparatedByString("(")
            let methodName = components[0]
            if functions[methodName] != nil {
                components.removeFirst()
                var arg = components.joinWithSeparator("(")
                let range = arg.rangeOfString(")", options: .BackwardsSearch)
