Refactors list of galleries on items form