- Moved the creation of entities to a single function.