Bug 1064600 - [Gallery] preliminary modularization before full gallery refresh