moved pp.lua to module/, minor bug fixes, code improvements