There are named functions, but the level of modularity is the file system. Each function is in its own file and the name of the file is the name of the function.
You can't actually create your own entities, but you can summon an invincible invisible armor stand that is unaffected by gravity and tagged with a custom model, then teleport it incrementally.
To correct the lighting issues, use an invisible armor stand that is on fire.