Lua stat properties

Fixes and documentation.