issue #2 refactoring of CLuaManager