Refactor LuaTableTest and fixes for LuaTable.