XML read/write fixed. Data images changed to jpg's.

Couple of small bugs fixed.