further cleanup, especially for entitysystem and mapsystem