Moved some methods into the TRACE class to make them methods and added option to save output.