Latest and greatest versions of core.py and main.py