Gallery 1.11

Code refactoring