risk_assessor.py code cleanup