More refactoring of the pools class