refactored and commented srm_explorer.py