Some fixes; added xml schema validation
Some fixed due to previous commit