Fixing all Lua errors \o/
Many changes