Initial commit of core.py