Some cleanups
allow nil