Added error messages on the textEdit fields and some code is refactored in the XML files.