XML classes fixed. Unit tests added.