Refactor history of plans