clean up the code; style the plot