Refactoring + gallery pictures management