Corrected namespaces; corrected script export functions; porting smallpt (path tracer).