Cleanups in PPU, refactoring and adding javadoc.
see, that wasn't so hard.