clean core.py