add leaves data structure to repository and fix Gallery bug introduced during objectifization