Fixed fragment bug, added Chemical Formula Generator logic