static jmp_buf ctrlc_;
 
-void sigint(int) {
+static void sigint(int) {
     longjmp(ctrlc_, 1);
 }
 
+static JSStringRef Result_;
+
 void Run(const char *code, FILE *fout) { _pooled
     JSStringRef script(JSStringCreateWithUTF8CString(code));
 
         if (exception != NULL)
             goto error;
 
+        CYSetProperty(context, CYGetGlobalObject(context), Result_, result);
+
         if (fout != NULL) {
             fputs(json, fout);
             fputs("\n", fout);
     }
 }
 
-void Console() {
+static void Console() {
     bool bypass(false);
     bool debug(false);
 
     fflush(fout);
 }
 
-void *Map(const char *path, size_t *psize) {
+static void *Map(const char *path, size_t *psize) {
     int fd;
     _syscall(fd = open(path, O_RDONLY));
 
         script = argv[1];
     }
 
+    Result_ = CYCopyJSString("_");
+
     if (script == NULL || strcmp(script, "-") == 0)
         Console();
     else {
 
     CYSetProperty(context, System_, CYJSString("args"), array);
 }
 
+JSObjectRef CYGetGlobalObject(JSContextRef context) {
+    return JSContextGetGlobalObject(context);
+}
+
 MSInitialize { _pooled
     apr_initialize();
 
     JSGlobalContextRef context(JSGlobalContextCreate(Global));
     Context_ = context;
 
-    JSObjectRef global(JSContextGetGlobalObject(context));
+    JSObjectRef global(CYGetGlobalObject(context));
 
     JSObjectSetPrototype(context, global, JSObjectMake(context, Runtime_, NULL));
-    CYSetProperty(context, global, CYJSString("obc"), JSObjectMake(context, Runtime_, NULL));
+    CYSetProperty(context, global, CYJSString("ObjectiveC"), JSObjectMake(context, Runtime_, NULL));
 
     CYSetProperty(context, global, CYJSString("Selector"), JSObjectMakeConstructor(context, Selector_, &Selector_new));
     CYSetProperty(context, global, CYJSString("Functor"), JSObjectMakeConstructor(context, Functor_, &Functor_new));
     System_ = JSObjectMake(context, NULL, NULL);
     CYSetProperty(context, global, CYJSString("system"), System_);
     CYSetProperty(context, System_, CYJSString("args"), CYJSNull(context));
-    CYSetProperty(context, System_, CYJSString("global"), global);
+    //CYSetProperty(context, System_, CYJSString("global"), global);
 
     CYSetProperty(context, System_, CYJSString("print"), JSObjectMakeFunctionWithCallback(context, CYJSString("print"), &System_print));
 
 
 }
 
 void CYProperty::Output(std::ostream &out) const {
-    out << *name_ << ':';
+    out << *name_;
+    out << ':';
     value_->Output(out, CYPA, CYNoFlags);
     if (next_ != NULL) {
         out << ',';
 
 Section: Development
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3-1
+Version: 0.9.65-1
 Description: runtime execution server and disassembler
 Name: Cycript
-Depends: mobilesubstrate (>= 0.9.3005-1), readline
+Depends: mobilesubstrate (>= 0.9.3005-1), readline, libffi
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/cycript/
 Tag: purpose::daemon, role::developer
 
 JSGlobalContextRef CYGetJSContext();
 const char *CYPoolJSONString(apr_pool_t *pool, JSContextRef context, JSValueRef value, JSValueRef *exception);
 void CYSetArgs(int argc, const char *argv[]);
+void CYSetProperty(JSContextRef context, JSObjectRef object, JSStringRef name, JSValueRef value);
+JSObjectRef CYGetGlobalObject(JSContextRef context);
+JSStringRef CYCopyJSString(const char *value);
 
 #endif/*CYCRIPT_HPP*/
 
 labelled statements don't get labelled
 blocks and empty statements are poorly factored
+property labels should get minimized
 functors use both ffiData and ffoData...
 rename "data" variables to "internal"