small cleanup phppaper.js