ImageLoader: refactoring, little fixes