Added missing initFromXML methods and unit tests