getting all entities of the scene
1) I've not read the code, so, I'm only guessing, I suppose the entities (if not parented with any other) are children of the current scene, so, the getChilds() function, without any parameter, may return a table of them.
2) even better a new function like this:
getEntities(scene, type, needle) where parameters are optionals. "scene" is needed to get entities from specified scene, "type" specifies the kind of entity you wish returned in the table (objects, sounds, camera, texts or lights), needle is a string useful for getting entities with particular name containing it, for example you may wish to get all objects named enemy (enemy1, enemy2,...) so, as needle you write "enemy"