Bit of tidying up and commenting