Updated core.py and main.js.