Code Cleanup & Shutdown Hook added