core models refactoring