Added XML preamble
Minor improvements