Refactoring to structure of ImageLoader