refactors Image model