Refactor ImageLoader.