Started refactoring the PPU code.