Refactoring. Using jaxb, xsd for the objects serialization.