Fixing comments on sql files and deleting metadata files when remove an image.