updated gallery directives, see main repo for detail