Moved initialization code
Fixed drag&drop of images and tweak behavior of drag&drop