Separate model and XML creation.