Ghosts read from xmls  + careful state

Ghosts read from xmls on the fly.
The state only changes if appropriate.