Fix dependency structure: move classes from models to models.core