Entity component system in Lua for my research project, warning it's rough