Separated Agilent REG and XML code into its own files and revised all TraceFile code.