Fixed more pylint issues and removed deprecated optimize_threshold.py