Added improvements and fixes
Added onImageLoaded event