added a loading indicator to the image and added some documenting comments