Comments and ShutdownHook and Shutdown Event added