further tidy main script and make more graphs