Refactor History related class.