PEP8 changes for core.py