Refactor for updated gem