Cleanups and CS fixes