Isolated Temp_dttt_index to where it's used, clean up
Global variable init
Increased limits, changed Basis to int to avoid overflow
Init global variables