Tidied up the files to use better error objects and plot the results