Improved tracing, added path optimization and plotters