Refactor poset data structure.