Added tuning_tools.py to facilitate error analysis.