Code cleanup, more implementation of atexit support.