General CS and WS cleanup