Updated the Trainer Factory to use the XML Factory