Corrections and tidying up