Cleaned up exception code for GC.