Adding support for galleries