Plotting routine added, minimize cleaned