Refactoring towards abstract factories for lattice implementations.