Threshold Analysis Working, Code Clean Up, Fixed Minor Program Issues