Several controls on one page

Hello!
I tried to do smth with several controls, that's what I get.
It works correctly as far as I tested it, but:
1 - I'm not sure that tests will pass, because I changed id to class
2 - I couldn't manage to use your tip to update existing gallery by only appending last image - it somehow fires second submit of form and I get two identical images
3 - I don't like very much that after create GET on /images goes twice (or more if there are more controls), but I didn't find an obvious way to solve this problem