Adding Gems and cleaning the state