Some more image refactoring