Refactored; moved models to separate project