Fix formatting
Check product's ID before using it
Unify variable names
Save backend in variable and use it
Use function to get backend
Set exclude flag for the new main image if previous one had it
Show confirmation message before removing image