Added support for Lua Scripting and some basic threading