Refactored most classes to be immutable while still supporting jaxb