Refactors image support