Add class Core to core.py and comments