Some cleanups to object manager and I/O context code