refactoring model for typed things