Gem refactory