refactor, creating directory for plots
refactor, plotter memory leak fixed