better lua doc and scripting fixes