Class 6 - tidying code