Lua scripting works on OS X

Fix headers / comments

reformat things

Fix corruption
Remove my local change
Merge pull request #53 from KLab/MacOSX_scripting

Mac osx scripting