Image display refactoring