image model refactoring