added models and core functionality to them