Small test refactoring anf CS fixes