Latest version. Minor tidy ups