testing and refactoring bufferedimageloader