Minor refactoring of ppu.