Added functionality for choosing primary image in edit and create. Fixed bug in modal gallery not updating when saved or updated