Cleanup code, itegrate some changes for better SPICE performance.