Added atexit handler to LightBase.