This is a tangled safety commit! Needs to be cleaned up.