greatly improved scripting, fixed proxydef