Delete pictures when uploading.
Fixed few bugs.