Juju gem refactoring