Converted to local scripts, swig instead of php