Code reformated and refactored
Handled broken image error
Handled simple preview Image with caption based on modal view
Fixed some issues with freezed image loading indicator
Removed usage of jQuery (only ajax requests)