Tidying up game layers and entities loader

Needed for pending stuff.

4 first commits are the important ones. Can be interesting to review the fifth just to understand how the process of loading and adding entities has changed. Last commit just contains lots of refactorings.