CS fixes and tidy up of tests

revert