Refactored code and added XSD and new elements.