A fair bit of tidying up