Moved core.py to models/core.py