Changes to conform to db and xsd