Lot of renaming and cleaning up in the _entities generation module code.
Added a layer option to the minimap, to control which units are drawn first.