cs fixes and test coverage