cs fixes and cleanups according to feedback