Added back state items per @abn and also removed replaced code.