Tidy up problem 1, produce graphs and output values.