Cleanups and additional checks