Improve performance & fix small bugs

Change the design of LuaObject classes
Minimize memory allocation