refatoring BufferedImageLoader class